Álvaro García
Álvaro García

Reputation: 19396

I have a .net 4.7 project but I can't add a reference to NetStandard 2.0

i have a project that is a .net 4.7. In the nuget manager, I install the .net standard 2.0 preview in this project, I can see the reference in the solution explorer, but I get an error that DateTime is definied in an assembly that is not referenced, that I have to add the reference to netstandard.dll.

I have added manually the reference to the netstandard.dll that I have in the package folder, but then I get the error that the System.boolean and other type are not definied.

So I would like to know how I could have a .net 4.7 project that use another project that is .net standard.

Thanks.

Upvotes: 3

Views: 1366

Answers (1)

Martin Ullrich
Martin Ullrich

Reputation: 100791

Until the automated tooling is shipped in an update to VS 2017 15.3 preview / .net core tooling 2.0.0 preview2, you need to include the NuGet package NETStandard.Library.NETFramework to get netstandard2.0 support in .NET Framework projects.

Upvotes: 6

Related Questions