asp.net-mvc System.Web.Mvc.dll 发生了什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/677875/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What happened to System.Web.Mvc.dll?
提问by Richard Ev
A colleague emailed me an example ASP.NET MVC project that won't build on my machine as it contains a reference to System.Web.Mvc.dll
一位同事通过电子邮件向我发送了一个示例 ASP.NET MVC 项目,该项目不会在我的机器上构建,因为它包含对 System.Web.Mvc.dll
In the .csproj file:
在 .csproj 文件中:
<Reference Include="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
I have VS2008 SP1 installed and can create new ASP.NET MVC web applications. However these don't include a reference to this assembly.
我安装了 VS2008 SP1,可以创建新的 ASP.NET MVC Web 应用程序。但是,这些不包括对此程序集的引用。
So, does anyone know in what version(s) of ASP.NET MVC this assembly exists, and what I should do to get this project to build?
那么,有谁知道这个程序集存在于 ASP.NET MVC 的哪个版本中,以及我应该怎么做才能构建这个项目?
Edit
编辑
How can I find out what version of ASP.NET MVC is installed on a machine?
如何找出机器上安装了哪个版本的 ASP.NET MVC?
回答by John Saunders
MVC just went RTM. You may be running an earlier version. Get the latest one.
MVC 刚刚进入 RTM。您可能正在运行早期版本。获取最新的。
ASP.NET MVC 1.0includes the assembly System.Web.Mvc.dll
ASP.NET MVC 1.0包括程序集System.Web.Mvc.dll
回答by ChrisF
To find out what version of MVC is installed:
要找出安装的 MVC 版本:
Search Program Files\Microsoft ASP.NET for System.Web.Mvc.dll.
在 Program Files\Microsoft ASP.NET 中搜索 System.Web.Mvc.dll。
It should be in a folder that has the release name on it or failing that right click and check the properties.
它应该在一个带有版本名称的文件夹中,否则右键单击并检查属性失败。
To fix your problem:
要解决您的问题:
- From within Visual Studio expand the references section and delete the current reference to System.Web.Mvc (right click "Remove").
- Right click on References and select "Add Reference"
- Select System.Web.MVC from the .NET tab.
- Rebuild your application.
- 在 Visual Studio 中展开引用部分并删除当前对 System.Web.Mvc 的引用(右键单击“删除”)。
- 右键单击引用并选择“添加引用”
- 从 .NET 选项卡中选择 System.Web.MVC。
- 重建您的应用程序。
It should now compile and run.
现在应该可以编译并运行了。
回答by SirDemon
You can also go to: http://www.microsoft.com/web/
您也可以访问:http: //www.microsoft.com/web/
And download the Web Platform Installer and install the MVC and other stuff through it.
并下载 Web Platform Installer 并通过它安装 MVC 和其他东西。
回答by sandeep talabathula
Here is my answer -
这是我的回答——
Best way is to use NuGet package manager. Just update the below MVC package and it should work
最好的方法是使用 NuGet 包管理器。只需更新下面的 MVC 包,它应该可以工作

