UWP app not able to resolve .NET Standard 2.0 assembly

Viewed 1629

I have a UWP app and in one of the referenced projects the serial port is getting used. So I made that project a .NET Standard 2.0 project. The UWP app was changed to Target Windows 10 Fall Creators Update (10.0;Build 16299)

As per the compatibility chart it should have worked. But I am getting compilation error

Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51.'

I am not sure what is going wrong.

2 Answers

In my case it was an outdated version of the Microsoft.NETCore.UniversalWindowsPlatform nuget that was causing this problem.

Try setting not only the Target but also the Minimum version to Fall Creators Update.

When creating a UWP app in Microsoft Visual Studio, you can choose which version to target. Projects using .NET Standard 2.0 must have a Minimum Version of Build 16299 or later. [docs]

Related