English 中文(简体)
.NET Core - Metapackage
  • 时间:2024-11-03

.NET Core - Metapackage


Previous Page Next Page  

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 apppcation, you will see the .NETCoreApp as shown below.

Console Apppcation

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

UWP Apppcation

    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 apppcation, the Miscrosoft.NETCore.UniversalWindowsPlatform NuGet Package reference is similar to the Microsoft.NETCore.App NuGet reference in Console apppcation.

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

    In Console apppcation, 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/cpckOnce/NuGetPackageExplorer.apppcation and you will see a small utipty downloading.

    Once downloading completes, then double-cpck on that file.

Open File

    Cpck 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 cpck on the Open a package from onpne feed option.

Onpne 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

    Cpck the open pnk and it will open the top-level dependencies of this metapackage.

Open Link

    Let us now open the .NETCore meta package for the .NETCore apppcation and meta-package for UWP apppcation 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