命名空间“System.Web”中不存在类型或命名空间“Mvc”

dot*_*bie 5 asp.net asp.net-mvc visual-studio

我最近安装了 VS.NET 2012 并将我的 ASP.NET MVC 4 项目移过去。然而,在构建解决方案时,我遇到了数百个错误:

The type or namespace 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference)
Run Code Online (Sandbox Code Playgroud)

AFAIK ASP.NET MVC 4 内置于 VS 2012 中,无需安装任何内容。有什么想法可以消除这些错误并构建应用程序吗?

Gab*_*abe 3

System.Web.Mvc您需要在项目中包含对程序集的引用。

  • 对于未来的解决方案寻求者,这可能位于 Visual Studio 的“引用管理器”对话框中“程序集”的“扩展”部分中... (7认同)