【发布时间】:2017-05-12 23:13:59
【问题描述】:
我根据 Scott Hanselmen、Phil Haack 和 Rob Conery 所著的专业 ASP.NET 3.5 MVC 第 13 章将 ASP.net 4 webform 项目转换为 Asp.net MVC4,由 Wiley Publishing, Inc. (ISBN) 出版:978-0-470-38461-9)。我也关注了这个blog。现在我可以添加控制器、视图等。所有的引用都已正确设置。没有构建错误。但是在启动转换后的项目时,我得到了编译错误。我在同一台机器上安装了 mvc3。我什至更改了对它的引用。它还在抱怨。你能帮忙吗?谢谢。
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Source Error:
Line 109: <namespaces>
Line 110: <add namespace="System.Web.Helpers"/>
Line 111: <add namespace="System.Web.Mvc"/>
Line 112: <add namespace="System.Web.Mvc.Ajax"/>
Line 113: <add namespace="System.Web.Mvc.Html"/>
Source File: c:\Users\Jon\Documents\Visual Studio 2012\Projects\CMT\Apps\Branches\3.0\Web.config Line: 111
【问题讨论】:
-
没看文章,我想知道,你是否添加了对mvc dll的引用?