2

To test this I created a new UWP app project.

The Target Version and Minimum Version of the project are both "Creators Update Build 15063".

I simply added a new .NET Core class library project to the solution and attempted to reference the .NET Core class library from the UWP project and the error appeared.

Also note that I even updated the Microsoft.NETCore.UniversalWindowsPlatform nuget package version in the UWP project to version to v5.3.3. The same error appears.

What gives? O_o

LeBrown Jones
  • 887
  • 6
  • 17
  • 2
    Related: https://stackoverflow.com/questions/40514546/difference-between-net-core-portable-standard-compact-uwp-and-pcl – jAC Jun 24 '17 at 23:14

1 Answers1

8

.NET Core is a completely different runtime than UWP.

When you create a .NET Core class library, it is one specifically and solely for .NET Core.

Instead, create a .NET Standard class library. You can reference a .NET Standard class library from many different runtimes, including both UWP and .NET Core.

Be sure to know which version of the .NET Standard you want to target in your class library. In general, target the lowest version you can successfully compile your library with.

You can read more about .NET Standard here.

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575