Reputation: 12855
I have created a .NET framework 4.6.2 web application.
Then I have created a .NET Standard class library. The target framework is 1.6 or 1.5 or everything lower it does not matter.
When I add the web application as project reference to the .NET Standard class library (unit test project) I get this error:
Severity Code Description Project File Line Suppression State
Error One or more projects are incompatible with .NETStandard,Version=v1.5.
Error Project Api is not compatible with netstandard1.5 (.NETStandard,Version=v1.5). Project Api supports: net462 (.NETFramework,Version=v4.6.2)
I use Visual Studio 2017 and have latest .NET Core 1.0/11 SDK installed.
How can I make it work?
Upvotes: 0
Views: 1562
Reputation: 127543
In the current 1.0 tooling .NET 4.6.2 can reference a .NET Standard 1.5 project, but a .NET Standard 1.5 project can not reference a .NET 4.6.2 project.
Once the "Tooling 2.0" comes out with netstandard 2.0 you will be able to do both directions using the new shims feature, but until that comes out you will need to make your class library unit test project also a .NET 4.6.2 project.
Upvotes: 1