MVC 4无法修复错误类型'System.Web.Mvc.WebViewPage< TModel>存在于元素中

编程入门 行业动态 更新时间:2024-10-26 18:26:08
本文介绍了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>存在于元素中

本文发布于:2023-11-10 00:34:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573871.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:元素   错误   类型   System   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!