I have an mvc project. It works locally but for some reason I have to have the System.Web.Mvc reference set as local. It is .net framework 4.0. The server has 4.5 installed and a previous version is working. But when I try to put the new version live on
the server I get the error.
Could not load file or assembly 'System.Web.Mvc, Version=18.104.22.168, 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)
But it should be using System.Web.MVC 4.0 which it is in the previous version. I just don’t know where I am going wrong. Any help would be really appreciated.
Did you changed your assembly information from web.config according to the framework version of the server ?
Check out the properties system.web.mvc in assembly reference version.
and check your web.config file as well for this section and the version.
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-22.214.171.124" newVersion="126.96.36.199" />
Thanks for your post.
Did you update your web.config on the server?