MVC4最低参考 [英] MVC4 minimum references
问题描述
由于新的MVC 4互联网项目没有少于47引用和29的NuGet包。我想知道什么引用次数最少我可以逃脱。我想选择我的Javascript和ORM解决方案。我基本上只是想准系统MVC框架。
我能摆脱?
而对于加分什么是最低我要补充得到的WebAPI工作?
Since a new MVC 4 Internet project has no less that 47 references and 29 nuget packages. I'm wondering what the least number of references I can get away with. I'd like to choose my Javascript and ORM solutions. I basically just want the barebones MVC Framework. What can I get rid of ? And for bonus points what is the minimum I have to add to get WebApi working ?
推荐答案
只是为了完整起见,这里是我发现需要部署到IIS工作ASP MVC应用程序的最低引用(在我的情况版7.5) 。也就是说,如果你只有这些引用,你的MVC应用程序将运行,如果没有所有的人,它不会运行。此外,记住我是从部署角度来看,不是一个本地开发Web服务器的角度来讲。没有所有这些引用本地运行可以工作,但在部署到IIS失败告终。
Just for the sake of completeness, here are the minimum references I found to be needed for a working ASP MVC application deployed to IIS (in my case version 7.5). That is to say, if you have these references only, your MVC application will run, and if you don't have all of them, it won't run. Also, keep in mind I'm speaking from a deployment perspective, not a local development web server perspective. Running locally without all these references may work but end up failing when deployed to IIS.
最低参考
REFERENCE COPY LOCAL*
--------- -----------
Microsoft.Web.Infrastructure true
System false
System.Web false
System.Web.Http false
System.Web.Mvc true
System.Web.WebPages true
System.Web.WebPages.Deployment true
System.Web.WebPages.Razor true
*复制本地设置为假的对时,他们添加到您的解决方案,这些引用。以上设置相应的引用复制本地属性,以确保建设项目时的DLL文件放入bin目录。这样一来,他们将拿起进行部署。
*Copy Local is set to false for these references when they're added to your solution. Set the Copy Local property for the references above accordingly to make sure the DLLs are put into the bin directory when building the project. That way, they will be picked up for deployment.
这篇关于MVC4最低参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!