Search code examples
uwp.net-standard-2.0

How can I reference a .NET Standard 2.0 class libary from a UWP app?


So according to Microsoft in this article:

"With the release of .NET Standard 2.0, we’re now officially deprecating PCLs and you should move your projects to .NET Standard"

Great. I would love to. Except I cannot reference a .NET Standard 2.0 class library from my Universal Windows app. How can this be?

Does Microsoft really expect that if I were to start a new multi-platform solution (involving an UWP client app) today, that shared code would have to be in obsolete PCL form? Am I missing something here?


Solution

  • If you read it again carefully, you will see this

    Upcoming version of UWP (expected to ship later this year)

    So no you cannot at the moment as it's yet to be supported.

    Update: this post just came out so basically you can now target 2.0 with the latest Visual Studio 2017 15.4.

    https://blogs.msdn.microsoft.com/dotnet/2017/08/25/uwp-net-standard-2-0-preview/