我最近开始使用 NuGet,我想知道是否有可以安装的 asp mvc 3 包,这样我就不必像传统方式一样通过 lib 文件夹引用 aspnet mvc3 程序集了引用设置为 CopyLocal = true.目前我的 lib 文件夹中有以下程序集:
Microsoft.Web.Infrastructure.dllSystem.Web.Helpers.dllSystem.Web.Mvc.dllSystem.Web.Razor.dllSystem.Web.WebPages.Administration.dllSystem.Web.WebPages.Deployment.dllSystem.Web.WebPages.dllSystem.Web.WebPages.Razor.dll有什么想法吗?
解决方案如果您使用的是 Visual Studio 2010 SP1,您可以右键单击项目并选择添加可部署程序集".选择 ASP.NET MVC 3 选项.这会将 MVC 程序集添加到一个特殊目录中,这将确保它们在构建/发布您的 Web 应用程序时位于 bin 目录中.
I have recently started to use NuGet and I was wondering if there is an asp mvc 3 package that I can install so that I do not have to reference the aspnet mvc3 assemblies via a lib folder like the traditional way with all references set to CopyLocal = true. At the moment I have the following assemblies in my lib folder:
Microsoft.Web.Infrastructure.dll System.Web.Helpers.dll System.Web.Mvc.dll System.Web.Razor.dll System.Web.WebPages.Administration.dll System.Web.WebPages.Deployment.dll System.Web.WebPages.dll System.Web.WebPages.Razor.dllAny idea?
解决方案If you're using Visual Studio 2010 SP1, you can right click on the project and select "Add Deployable Assemblies". Select the ASP.NET MVC 3 option. That'll add the MVC assemblies to a special directory which will ensure they are in the bin directory when building/publishing your web application.
更多推荐
用于 ASP.NET MVC 3 的 NuGet 包
发布评论