安装MVC 4 Beta版,现在我的MVC 3项目抛出一个错误,当我全部重建 [英] Installed MVC 4 Beta, now my MVC 3 projects throw an error when I rebuild all

查看:107
本文介绍了安装MVC 4 Beta版,现在我的MVC 3项目抛出一个错误,当我全部重建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚安装了MVC 4 Beta版,现在我的MVC 3项目(即我还没有转换成4)抛出一个错误,当我全部重建:

I just installed MVC 4 Beta, and now my MVC 3 projects (that I haven't converted yet to 4) are throwing an error when I rebuild all:

错误18 [A] System.Web.WebPages.Razor.Configuration.HostSection不能转换为[B] System.Web.WebPages.Razor.Configuration.HostSection。类型从起源System.Web.WebPages.Razor,版本= 1.0.0.0,文化=中性公钥= 31bf3856ad364e35'的背景下,默认的位置'C:\\Windows\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Web.WebPages.Razor\\v4.0_1.0.0.0__31bf3856ad364e35\\System.Web.WebPages.Razor.dll'. B型从上下文'默认'System.Web.WebPages.Razor,版本= 2.0.0.0,文化=中性公钥= 31bf3856ad364e35'起源于位置'C:\\Windows\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Web.WebPages.Razor\\v4.0_2.0.0.0__31bf3856ad364e35\\System.Web.WebPages.Razor.dll'.

有没有人遇到过这个吗?谢谢!

Has anyone come across this yet? Thanks!

推荐答案

我花了一整天试图解决这一问题,并经过一个下午系统抓取所有的东西我的项目除了一个基本观点,一个基本的控制器,它是仍然抛出这个错误。于是,我开始删除其他的东西,在那里发现是,在它有MVC 3的东西我查看文件夹中的流氓Web.Config文件。

I've spent the entire day trying to fix this, and after an afternoon systematically ripping EVERYTHING out of my project except one basic view and one basic controller it was still throwing this error. So I started deleting other stuff and found there was a rogue Web.Config file in my Views folder that had MVC 3 stuff in it.

搜索您的项目为其他Web.config文件中!

Search your project for other Web.Config files!!!

这篇关于安装MVC 4 Beta版,现在我的MVC 3项目抛出一个错误,当我全部重建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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