Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
srivatsn opened this issue Jan 30, 2017 · 6 comments
Closed

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

srivatsn opened this issue Jan 30, 2017 · 6 comments
Assignees
Labels
Milestone

Comments

@srivatsn
Copy link
Contributor

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

@srivatsn
Copy link
Contributor Author

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
Copy link

Is it the same issue as #686?

@dsplaisted
Copy link
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>

@davkean
Copy link
Member

davkean commented Feb 3, 2017

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

@isaacwalkercox
Copy link

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

@davkean
Copy link
Member

davkean commented Jul 9, 2019

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

mmitche pushed a commit to mmitche/sdk that referenced this issue Jun 5, 2020
* Update dependencies from https://github.com/dotnet/arcade build 20190703.19

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19353.19

* Update dependencies from https://github.com/dotnet/arcade build 20190704.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19354.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants