简体   繁体   中英

Could not load file or assembly 'System.Web.Mvc(1)' or one of its dependencies

The following error appeared after deploying the application to IIS, although it's NOT the first time to deploy this web application, but this is a new update to it!

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

在此处输入图片说明

It looks like you tried to install the ASP.NET MVC dependency twice since you have System.Web.Mvc(1) instead of plain System.Web.Mvc , so please take note of that. More than likely, that other assembly you are using is referencing the old dll, so make sure you have the right newVersion value under BindingRedirect in your Web.config file, as it should look something like this:

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
      <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM