.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.
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.
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 Files\dotnet directory.
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 Files\dotnet\shared\Microsoft.NETCore.App\2.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.
Figure 4, .NET Core 2.0 modular, NuGet packages
Comments
- Anonymous
March 04, 2018
All the stuff for itself to run including Controllers, Services, Views and event static files.