Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does ASP.NET MVC 4 have so many NuGet packages and which are truly important?

As the title says, why do the ASP.NET MVC 4 projects have soooo many NuGet packages? Is the entire framework split into packages now? Which ones are truly important for an empty project that will be a website, no API, etc?

UPDATE

To clarify, I'm not having issue, well, unless you count basic confusion as one. I just want to know why new MVC 4 projects have so many packages installed by default? An empty project has one full page of packages. An internet project has three full pages of packages.

I'm just curious why this is because my current MVC 3 projects use at max five packages.

like image 506
Gup3rSuR4c Avatar asked Aug 16 '12 22:08

Gup3rSuR4c


People also ask

What is NuGet in ASP.NET MVC?

NET and Visual Studio. NuGet can be used to find and install packages, that is, software pieces and assemblies and things that you want to use in your project. NuGet is not a tool that is specific to ASP.NET MVC projects.

What is the purpose of the NuGet package manager in asp net core?

The NuGet Package Manager can be used to search and install NuGet packages in the Visual Studio solution or project. Right-click the project or solution in the Solution Explorer tab, and choose Manage NuGet Packages… Alternatively, click Tools, menu, NuGet Package Manager | Manage NuGet Packages for Solution...

How use NuGet package in asp net?

Right-click the folder in the project, and then select Add Packages… Select the NuGet.org from the Package source drop-down. The Syncfusion ASP.NET Web Forms NuGet Packages are listed and available. Search and install the required packages in your application, by clicking Add Package button.


1 Answers

As the title says, why do the ASP.NET MVC 4 projects have soooo many NuGet packages?

That's a question you need to ask the designers of the framework.

Which ones are truly important for an empty project that will be a website, no API, etc?

Here's the strict minimum that will allow you to configure routing and define a controller with an action rendering a Razor view:

<packages>   <package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net40" />   <package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net40" />   <package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net40" />   <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" /> </packages> 

or if you prefer only 1/2 of a page:

enter image description here

like image 171
Darin Dimitrov Avatar answered Oct 08 '22 05:10

Darin Dimitrov