Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

.NET Core 2.0 modular and NuGet packages

One of the cool features of the .NET Core is that the namespaces you reference in the project are the only ones that are contained in the DLL your project renders.  I was reading that when you initially create a project in Visual Studio, that numerous packages are included by default and was wondering, because the list of default packages was long, see Figure 1, whether all of them would be included, which I was thinking is against the design principle.

image

Figure 1, .NET Core 2.0 modular, NuGet packages

I wanted to find out which packages were actually deployed with my DLL.  I used a tool called Just Decompile to look at this.  I saw that only a small set of the packages were included, Figure 2 and this was what I expected and found.

image

Figure 2, .NET Core 2.0 modular, NuGet packages

As I mentioned here (Target .NET Core 2.0 and .NET Standard 2.0), see Figure 3, that the packages are installed into the C:Program Filesdotnet directory.

image

Figure 3, .NET Core 2.0 modular, NuGet packages

As you see in Figure 2, all the package references have a yellow triangle next to it except System.Console.  Once I navigated to C:Program FilesdotnetsharedMicrosoft.NETCore.App2.0.0 and selected the, for example, System.Diagnostics.Debug package / module assembly. Figure 4, I was then able to work with it.  This is good stuff.

image

Figure 4, .NET Core 2.0 modular, NuGet packages

Share the post

.NET Core 2.0 modular and NuGet packages

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×