I'm developing a library for use with WPF and Windows 10. I'm running into issues getting it to compile on the latter. Here is some of the code:

project.json

{ "frameworks": { "net46": { "frameworkAssemblies": { "WindowsBase": "4.0.0.0" } }, "netcore50": { "dependencies": { "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" } } } }

Dependency.cs

using System; using System.Collections.Generic; #if NET46 using System.Windows; // .NET Framework 4.6 #elif NETCORE50 using Windows.UI.Xaml; // Windows 10 apps #endif public static class Dependency { public static DependencyProperty Register<T, TOwner>(string name, PropertyChangedCallback<T, TOwner> callback) where TOwner : DependencyObject { // Code here.... } }

While this compiles fine for net46 (which is the traditional .NET Framework), I'm having trouble getting it to work for netcore50 (which can be used by Windows 10 apps). For some reason, it looks like types like DependencyProperty or DependencyObject are not included in that configuration.

Is there a netcore50 -compatible NuGet package I can install that contains these types, so I can use them from my library?

Thanks for helping.