ASP.MVC 6 Features - Managing Packages

As developers, one of the thing we do frequently is adding references in the project. All these added dll's are listed under the References folder. Also listed are the libraries added by NuGet package manager used in C# code. These are called server side dependencies and is used in server side coding part.

Since it's now possible to target multiple frameworks, the refernces are now grouped under References folder based on the targeted environments.

By default, it will list two items under References, DNX 4.5.1 is targeting .NET framework 4.5 and DNX Core 5.0 is targetting .NET Core framework. If you expand it, then all referenced dll's will be listed.

If you look closely the icons for the references, you can see that it's having the icon of Nuget. It indicates that these are all NuGet packages and if you manually added a dll, then it will have a different icon.

Apart from these we will making use of different types of client side libraries like jQuery, Kendo, Angular etc. In MVC 6 all of it are placed under the dependencies folder. Managing client side frameworks is more tedious when compared to the server side cousins and two of the great names in open source package management is now supported in MVC 6. Bower and npm packages will be listed under the Dependencies 

 

You can refer the below links for managing client side packages with Bower and npm

Manage Client-Side Packages with Bower

Managing Client-side Dependencies with NPM, Bower and Gulp

Saving Server Side package space

In the earlier versions, we use NuGet package manager to download numerous libraries and asseblies for the various projects in the machine. All there are stored in the packages folder in the project itself. So you machine has got copies of same package in different folders which is actually wasting the disk space. In MVC 6 the packages are stored in a central location there by reducing the size used in disk considerably. The new location is under the .dnx folder in the Windows users folder.


No Comments

Add a Comment