用于 ASP.NET MVC 3 的 NuGet 包

编程入门 行业动态 更新时间:2024-10-28 20:23:20
本文介绍了用于 ASP.NET MVC 3 的 NuGet 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近开始使用 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.dll

Any 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 包

本文发布于:2023-11-08 13:07:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569467.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:NET   ASP   NuGet   MVC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!