[VS11] Razor 出現 ASP.Net runtime error

自從電腦灌了 VS 11 beta 和 Visual Studio 2010共存後,MVC的Razor常常出問題…

Razor 特有的 @ 出現無法辨識,錯誤訊息如下:

ASP.Net runtime error.The pre-application start initialization method Start on type System.Web.WebPages.Deployment.PreApplicationStartCode threw an exception with the following error message: Exception has been thrown by the target of an invocation...


在 web.config 中把下放那行刪除或註解即可。

[xml]<add key="webpages:Enabled" value="true" />[/xml]


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>