MVC 4无法修复错误类型'System.Web.Mvc.WebViewPage< TModel>存在于元素中 [英] MVC 4 Can't fix the error The type 'System.Web.Mvc.WebViewPage <TModel> exists in the elements

查看:235
本文介绍了MVC 4无法修复错误类型'System.Web.Mvc.WebViewPage< TModel>存在于元素中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将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>存在于元素中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆