Dependency issue when upgrading my computer to mvc4, and trying to deploy mvc3 applications

1

I am having a very similar problem to this: https://stackoverflow.com/questions/11023923/how-to-fix-this-mvc-website-error-could-not-load-file-or-assembly-system-web-h

same exact error message:

Could not load file or assembly 'System.Web.Helpers' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I know this problem has to do with the upgrade from mvc3 to mvc4. My application is mvc3, but i installed mvc4 on my computer which is causing some sort of dependency issue. To fix this problem, I have to install mvc4 on my server to make it work, but with azure its a pain because none of my mvc4 installations stick to the server. Is there a way I can fix this so I don't have to install mvc4 everytime? or make it so my azure instance has it permanently installed. It's a real pain when I start deploying.

windows
asp.net
asp.net-mvc
azure
asked on Server Fault Sep 24, 2012 by (unknown user) • edited May 23, 2017 by Community

1 Answer

0

You really don't have to install MVC runtime in Azure VM because this step is not needed as long as you have all the MVCx references included and set to "Copy local as true" in your Windows Azure Application. Most common problem with upgrading MVCx to MVCy is that some time some references are not configured correctly and reference mismatch occurred and this can be avoided by second look at all your MVC specific references properties to check they are coming from MVC4 and set as Copy local.

To check you have MVC4 references configured correctly in your Windows Azure application, I would suggest:

  1. Create a "Hello World" Windows Azure MVC4 application
  2. Compare MVC4 specific references properties between your application and "hello world" application for any irregularities and if you find one, fix it (This should be enough)
  3. Package (CSPKG) both the Application and unzip to package to be sure that all the MVC specific references in both package are identical in version/size (this is another setup in verification which is not needed but a few minutes will save you lots of hassle later so you sure can do it)
answered on Server Fault Sep 24, 2012 by AvkashChauhan

User contributions licensed under CC BY-SA 3.0