Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
310 views
in Technique[技术] by (71.8m points)

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.

question from:https://stackoverflow.com/questions/11996173/why-does-asp-net-mvc-4-have-so-many-nuget-packages-and-which-are-truly-important

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...