RazorGenerator icon indicating copy to clipboard operation
RazorGenerator copied to clipboard

.Net 4.5.1 and MVC 5

Open eyarham opened this issue 11 years ago • 9 comments

I'm trying to integrate RazorGenerator into my solution, but I'm getting an error that RazorGenerator is looking for MVC 3.0.0.1 and isn't finding it. What is the recommended workaround until the update is made?

eyarham avatar Jun 05 '15 18:06 eyarham

Can you give more details about the error you're seeing? Is it at design time in VS, or at runtime? What's the full text of the error?

davidebbo avatar Jun 05 '15 19:06 davidebbo

Also, please check what versions of MVC you have in your GAC.

davidebbo avatar Jun 05 '15 19:06 davidebbo

The error is as follows:

Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Calling assembly : RazorGenerator.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4.

It's at runtime. The build works just fine. I pulled down the repo and migrated RazorGenerator.Mvc to .Net 4.5.1, and upgraded to MVC 5, which got my solution working. Clunky, but working.

I have no versions of System.Web.Mvc in my GAC

eyarham avatar Jun 05 '15 20:06 eyarham

What version of MVC are you intending to use? Do you have the proper bindingRedirect in your web.config?

davidebbo avatar Jun 05 '15 20:06 davidebbo

I'm using MVC5. I have the binding redirect configured as follows:

<dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>

eyarham avatar Jun 05 '15 20:06 eyarham

Then normally it should be impossible for 3.0.0.1 to get loaded, so something strange is going on with your app. All MVC assembly loads should end up loading 5.2.3.0.

davidebbo avatar Jun 05 '15 20:06 davidebbo

That was my understanding as well. I'll keep digging. Thanks for your help!

eyarham avatar Jun 05 '15 20:06 eyarham

Any update on this?

chaitanyakale avatar Oct 31 '15 06:10 chaitanyakale

any update on this? experiencing the same issue.

czuroski avatar May 22 '17 13:05 czuroski