This error happens after add Razor engine into ASP.NET MVC 4 project by nuget package.
https://github.com/Antaris/RazorEngine
I fixed this problem by remove following part from web.config
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
Reason:
Default ASP.NET MVC 4 razor engine is version 2, and nuget for RazorEngine project is version 3.
No comments:
Post a Comment