Search code examples
c#.net.net-core.net-standard.net-standard-2.0

Use UWP methods from .Net Standard library


I know there is a way to use UWP methods from WPF apps.

My question is whether there is a way to use those methods from a .Net Standard library. Just adding the references mentioned here doesn't help. It doesn't recognize them.


Solution

  • Individual Platforms (.NET Framework, .NET Core, UWP, Mono) can reference .NET Standard libraries. But .NET Standard libraries cannot reference other libraries built specifically for a platform (.NET Framework, UWP etc).

    Which makes sense since .NET Standard libraries themselves are supposed to be platform agnostic, so you shouldn't be able to add a library that would only work on a single platform.