类型或名称空间名称"Mvc"不存在 [英] The type or namespace name 'Mvc' does not exist
问题描述
我最近安装了Visual Studio2013.从网络上下载示例项目后,在我运行它时,出现以下错误-
The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
如何克服此错误?
错误的根源可能是您没有对MVC框架库的引用.一个简单的解决方案是添加此引用槽Nuget. MVC库将安装在您的bin
目录中,如果需要,所有引用都将添加到您的项目中.
浏览以查找MVC软件包(工具-> Nuget软件包管理器->管理解决方案的Nuget软件包)或使用Nuget控制台进行安装(工具-> Nuget软件包管理器->程序包管理器控制台),方法是输入Install-Package Microsoft.AspNet.Mvc
.您可以在 AspNet.Mvc的官方Nuget页面上找到其他信息../p>
I have recently installed visual studio 2013. After downloaded a sample project from web, while i run it, it gives me the following errors-
The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
How to overcome this error?
The source of your error may be that you do not have a reference to the MVC framework library. A simple solution is to add this reference trough Nuget. The MVC library will be installed in your bin
directory and, if needed, all the references will be added to your project.
Either browse for the MVC package (Tools -> Nuget Package Manager -> Manage Nuget Packages for Solution) or install it using the Nuget console (Tools -> Nuget Package Manager -> Package Manager Console) by entering Install-Package Microsoft.AspNet.Mvc
. You can find additional information on the official Nuget page for AspNet.Mvc.
这篇关于类型或名称空间名称"Mvc"不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!