Skip to content

.NET Core project reference from .NET app fails at runtime #757

Closed

Description

@srivatsn

From @maloo on January 29, 2017 1:2

Repro:
Create a .NET console app and a .NET core library targetting .net standard. (I also had to change to .NET 4.6.2 and .net standard 1.5) Add reference to library project in .net console app and run the app. This will fail with System.Runtime 4.1 load failure.

Workaround:
Manually add Netstandard.Library package to console app

Expected behavior:
If I add a project reference to a .net standard dll project I expect the package dependencies of that project to be picked up by msbuild. Having to pack/deploy a library as a nuget and reference the package is NOT the way to go for project references.

Version:
VS2017RC, 26th Jan

Copied from original issue: dotnet/msbuild#1626

Activity

  1. srivatsn commented on Jan 30, 2017

    @srivatsn
    ContributorAuthor

    From @cdmihai on January 30, 2017 17:38

    @davkean @srivatsn

    This sounds more like an SDK or project system issue. If that is the case, can you please re-open it on the better suited repo page?

  2. added this to the 1.0 RTM milestone on Jan 30, 2017
  3. BladeWise commented on Jan 31, 2017

    @BladeWise

    Is it the same issue as #686?

  4. dsplaisted commented on Feb 3, 2017

    @dsplaisted
    Member

    This is because package references don't by default flow from project to project. PackageReference support fixes that. So you to fix this, you can either add a package reference to the .NET Framework project and select PackageReference over packages.config when it asks you, or you can add the following property to the .csproj:

    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
  5. davkean commented on Feb 3, 2017

    @davkean
    Member

    Going to dup this against: NuGet/Home#4488 which is tracking the experience.

  6. reopened this on Feb 3, 2017
  7. isaacwalkercox commented on Jul 9, 2019

    @isaacwalkercox

    This problem is still active as of the latest version of Visual Studio 2017 as it's what I am using!

  8. davkean commented on Jul 9, 2019

    @davkean
    Member

    @isaacwalkercox this bug was dup'd against NuGet/Home#4488, which is still open.

  9. added theissue type on Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions