You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.NET Core project reference from .NET app fails at runtime #757
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.
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:
Activity
srivatsn commentedon Jan 30, 2017
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?
BladeWise commentedon Jan 31, 2017
Is it the same issue as #686?
dsplaisted commentedon Feb 3, 2017
This is because package references don't by default flow from project to project.
PackageReferencesupport 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:davkean commentedon Feb 3, 2017
Going to dup this against: NuGet/Home#4488 which is tracking the experience.
isaacwalkercox commentedon Jul 9, 2019
This problem is still active as of the latest version of Visual Studio 2017 as it's what I am using!
davkean commentedon Jul 9, 2019
@isaacwalkercox this bug was dup'd against NuGet/Home#4488, which is still open.
[master] Update dependencies from dotnet/arcade (dotnet#757)