在VisualStudio 2012上使用MVC3出现错误的解决办法

1. 错误:

找不到方法:“System.Collections.Generic.Dictionary`2<System.String,BlockParser> System.Web.Razor.Parser.CSharpCodeParser.get_RazorKeywords()”。

解决方法:在web.config中删除:

<dependentAssembly>
   
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35"  
                      culture
="neutral"/>
   
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
</dependentAssembly>

原文地址:https://www.cnblogs.com/ustcyc/p/3736825.html