Is .NET for Universal Windows Program a subset of .NET Core?

No, UWP is a distinct api that targets a different windowing model, replacing large parts of the traditional winapi. You get a .NETCore dependency because the project templates in VS select it. For a good reason, you can get the U in UWP (Universal Windows Platform) only from .NETCore, devices like phones and Hololens don't have the full .NET framework version available. Trying to be competitive in mobile applications was a core reason for UWP.

UWP is a COM based api, basic reason why it works with languages like Javascript and C++. Otherwise very well hidden, the traditional type library format of COM was replaced with .winmd, a format that is heavily based on the metadata format of .NET. It can emulate features that COM cannot support, like generics, static methods and implementation inheritance. The language projection that's required to get this emulation is built into the CLR. Not much they could do to make exceptions work better.

You can use a UWP api in a desktop app as well. Microsoft doesn't encourage that so you get no help from a project template. Easy to fix with a text editor, add <TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion> to your .csproj file and now you can use Project > Add Reference and select a UWP contract. Handy to take advantage of the device namespaces.


Straight Answer: No it is not!

Long Answer: It's complicated

  • uap10.0 (UWP) and netcoreapp1.0 (cross-platoform .NET Core) are competing app models / SDK / Platforms (whatever terminology Microsoft chooses to mention next). I use the target framework monikers (the technical terminology) here onwards to avoid confusions around the term ".NET Core". uap10.0 focus on Windows based UI applications and netcoreapp1.0 is basically console applications for cross platforms (which like any programs can run servers, like ASP.NET).
  • The superset / subset question is tricky. They overlap. uap10.0 implements the netstandard1.4 and netcoreapp1.0 implements the netstandard1.6 (which is a strict superset to netstandard1.4) (platform standard documentation). However, both application models add significant additional libraries to it (uap10.0 adds e.g. the Windows.* libraries, while the library for netcoreapp1.0 called Microsoft.NETCore.App (NuGet) adds stuff like immutable collections, networking, filesystem, cryptography and other things which are not standardized (yet) across the .NET implementations).
  • The terminology ".NET Core" is basically screwed up. The CLR which runs uap10.0/UWP was derived from Silverlight which labelled its runtime coreclr. The modern cross platform netcoreapp1.0 uses a CLR derived from the UWP project. The same is true for the libraries which in all cases are System.Runtime based instead of mscorlib based.

Update August 2019

  • By now there is still the same difference between uap10.x and netcoreapp3.x. However, they both implement the netstandard2.x (and so do mono and unity). The netstandard2.x subset is a significant API surface making most nuget packages compatible with both.
  • to my understanding a big part of the winrt API surface will be accessible to netcoreapp3.x with their included COM support (covering winrt com and traditional COM). That makes the netcoreapp3.x intersection very significant. This is scheduled for later 2019.
  • netcoreapp3.0 will also support WPF and WinForms and other .NET Framework libraries. These will never be supported by uap10.0.
  • The UWP technology stack (which are several layers) are now support packaging/store treatment for any kind of app (not only uap/winrt once).
  • The real interesting stuff is coming with .NET 5 and 6. Java, WebAssembly and Swift interop, AOT compilation and MonoVM. The accessible library surface and the deployment locations will explode.

.NET Core is a cross-platform subset of .NET that can be use to build apps for Windows, Linux, Mac, and yes, UWP.

UWP Api is also a subset of the .NET API, which can run on .NET Core. It also has a number of API's that are unique to UWP. UWP apps can be .NET core apps, but the reverse is not necessarily true. Not all .NET core apps are UWP apps.

Just like there are API's for .NET Core that only apply to Linux, or Mac.