为什么ASP.NET MVC 4有这么多的NuGet包的,哪些是真正重要的? [英] Why does ASP.NET MVC 4 have so many NuGet packages and which are truly important?

查看:713
本文介绍了为什么ASP.NET MVC 4有这么多的NuGet包的,哪些是真正重要的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说,为什么ASP.NET MVC 4个项目有许多SOOOO包的NuGet?在整个框架分为包呢?哪些是一个空的项目,这将是一个网站,没有API,真正重要的等等?

更新

要澄清,我没有问题,那么,除非你基本的混乱之一。我只是想知道为什么新的MVC 4项目有默认安装这么多包?一个空的项目有包一整页。一个互联网项目有包装的三全页。

我只是好奇,为什么这是因为我目前的MVC 3项目,在最大五个包使用。


解决方案

  

正如标题所说,为什么ASP.NET MVC 4个项目有许多SOOOO包的NuGet?


这就是你需要问框架的设计问题。


  

哪些是一个空的项目,这将是一个网站,没有API,真正重要的等等?


这里是严格的最低,这将允许您配置路由和行动呈现的Razor视图定义控制器:

 <套餐及GT;
  <包ID =Microsoft.AspNet.Mvc版本=4.0.20710.0targetFramework =net40/>
  <包ID =Microsoft.AspNet.Razor版本=2.0.20710.0targetFramework =net40/>
  <包ID =Microsoft.AspNet.WebPages版本=2.0.20710.0targetFramework =net40/>
  <包ID =Microsoft.Web.Infrastructure版本=1.0.0.0targetFramework =net40/>
< /包>

或者如果你preFER只有一个页面的1/2:

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.

解决方案

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:

这篇关于为什么ASP.NET MVC 4有这么多的NuGet包的,哪些是真正重要的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆