WebApiContrib / WebApiContrib.Formatting.RazorViewEngine

MOVED HERE -> https://github.com/WebApiContrib/WebApiContrib.Formatting.Razor
https://github.com/WebApiContrib/WebApiContrib.Formatting.Razor
MIT License
6 stars 6 forks source link

System.Web.Razor.Parser.MarkupParser can't load #5

Open PooreMan opened 11 years ago

PooreMan commented 11 years ago

When attempting to run the sample "MvcWebApiSiteTest" project included in this package, it throws the following exception in RazorViewParser.cs, Line 50: "Could not load type 'System.Web.Razor.Parser.MarkupParser' from assembly 'System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'."

jakejscott commented 11 years ago

I get the same error, is anyone maintaining this project?

jakejscott commented 11 years ago

So turns out the problem is that Razor Engine does not yet support the 2.0 version of Razor yet. You can add this to your web.config and it will work... Need to get the Razor Engine dudes to create a branch for Razor 2.0 but I think its a big job

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

Read about it here

https://github.com/Antaris/RazorEngine/issues/57
jakejscott commented 11 years ago

I think there is an experimental branch here that upgrades it to Razor 2.0 https://github.com/coxp/RazorEngine/commits/release-3.0

di97mni commented 11 years ago

Any plans to fix this in the near future?