.NET Core - Metapackage



In this chapter, we will discuss the references between our Console app and our UWP app. If you look at the References in Solution Explorer of your Console application, you will see the .NETCoreApp as shown below.

Console Application

.NETCoreApp is a new framework that targeted .NET Core application. Now if you look under the References of UWP application, it will look a bit different as shown below.

UWP Application
  • The main reason for this is because here in UWP we have the *.csproj, so we are back to the old style of references and we can target only one framework with this project type.

  • The references are similar though. You can now see that in UWP application, the Miscrosoft.NETCore.UniversalWindowsPlatform NuGet Package reference is similar to the Microsoft.NETCore.App NuGet reference in Console application.

  • Both Miscrosoft.NETCore.UniversalWindowsPlatform and Microsoft.NETCore.App are meta-package which means that they are composed of other packages.

  • In Console application, we can drill in and see other packages inside Microsoft.NETCore.App, but we can’t do the same Miscrosoft.NETCore.UniversalWindowsPlatform in Solution Explorer.

  • However, we can use another tool, the NuGet Package Explorer to look at this. Let us now open this url in the browser − https://npe.codeplex.com/downloads/get/clickOnce/NuGetPackageExplorer.application and you will see a small utility downloading.

  • Once downloading completes, then double-click on that file.

Open File
  • Click Install to start installation on the NuGet Package Explorer.

NuGet Package Explorer
  • When the installation is finished, you will see the following dialog box.

Finished
  • Let us now click on the Open a package from online feed option.

Online Feed
  • By default it will search for the nuget.org feed. Let us now search for Microsoft.NETCore.UniversalWindowsPlatform in the search box and you will see 1 result as shown below.

Nuget Org feed
  • Click the open link and it will open the top-level dependencies of this metapackage.

Open Link
  • Let us now open the .NETCore meta package for the .NETCore application and meta-package for UWP application side by side.

Meta Package
  • You can now see that each meta-package is composed of different set of packages.

  • .NET Core is a subset of the classes available in .NET Framework at least at this point of time, but is growing and will be as per the base classes of .NET Framework.

  • The UWP is based on .NET Core, it is a superset of the APIs available for Windows Store development.

We now have more APIs available for development due to .NET Core.

Advertisements