根據Professional ASP.NET 3.5 MVC的第13章,Scott Hanselmen和Phil Haack將ASP.net 4 webform項目轉換爲Asp.net MVC4,以及Rob Conery,由Wiley Publishing,Inc出版(ISBN:978-0-470-38461-9)。我也跟着這blog。現在我可以添加控制器,視圖等。所有的參考都設置正確。沒有生成錯誤。但是在啓動轉換後的項目時,我收到了編譯錯誤。我在同一臺機器上安裝了mvc3。我甚至改變了參考。它仍然抱怨。你能幫忙嗎?謝謝。CS0234:Mvc不存在於System.Web命名空間中
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的? – 2013-02-12 01:58:42