将MVC 4项目从VS 2012移至VS 2013社区后,出现以下错误(在LogIn.cshtml页面中).
after moved my MVC 4 project from VS 2012 to VS 2013 Community I get the following error (in the LogIn.cshtml page).
CS0433:类型"System.Web.Mvc.WebViewPage"存在于元素c:\ Windows \ Microsoft.NET \ assembly \ GAC_MSIL \ System.Web.Mvc \ v4.0_4.0.0.0__31bf3856ad364e35 \ System.Web .Mvc.dll和c:\ Windows \ Microsoft.NET \ assembly \ GAC_MSIL \ System.Web.Mvc \ v4.0_3.0.0.0__31bf3856ad364e35 \ System.Web.Mvc.dll
CS0433: The type 'System.Web.Mvc.WebViewPage "exists in the elements c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.Mvc\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll and c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.Mvc\v4.0_3.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll
我从C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files删除了所有文件,清除了解决方案,但问题仍然存在.如何解决?
I deleted all files from C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files, cleaned the solution but the problem remains. How to fix it ?
Test项目使用了MVC 3,这就是原因
The Test project used the MVC 3, that was the reason
推荐答案如果您已经尝试了上述解决方案,但仍然遇到相同的问题,请尝试以下一种方法-> 转到项目文件夹,然后在其中找到 bin 文件夹->删除 System.Web.Mvc.dll 和 System.Web.Mvc.xml 从那里.
If you have already tried the above solutions and are still getting the same problem then try this one-> Go to your project folder and in there locate the bin folder --> Remove System.Web.Mvc.dll and System.Web.Mvc.xml from there.
更多推荐
MVC 4无法修复错误类型'System.Web.Mvc.WebViewPage< TModel>存在于元素中
发布评论