Is it possible to ignore assembly manifest mismatch?

I am trying to use several libraries on my asp.net site that I used with NuGet.

Problem: I get this error:

Could not load file or assembly 'AWSSDK, Version=1.5.9.1, Culture=neutral, PublicKeyToken=cd2d24cd2bace800' or one of its dependencies. The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 

One of the libraries I'm trying to use should use AWSSDK, but it seems to be looking for an older version that I can no longer get.

Can this error be ignored?

This is a brand new website that does not yet have code, namely that NuGet has been dragged out, web.config is empty.

EDIT:

I added the Fusion log and now I get:

 === Pre-bind state information === LOG: User = WIN-FSSH1EIG4NE\Max LOG: DisplayName = AWSSDK, Version=1.5.9.1, Culture=neutral, PublicKeyToken=cd2d24cd2bace800 (Fully-specified) LOG: Appbase = file:///C:/Users/Max/Documents/Visual Studio 2010/WebSites/images.RepZio/ LOG: Initial PrivatePath = C:\Users\Max\Documents\Visual Studio 2010\WebSites\images.RepZio\bin Calling assembly : ImageResizer.Plugins.S3Reader, Version=3.3.2.447, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Users\Max\Documents\Visual Studio 2010\WebSites\images\web.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Post-policy reference: AWSSDK, Version=1.5.9.1, Culture=neutral, PublicKeyToken=cd2d24cd2bace800 LOG: Attempting download of new URL file:///C:/Users/Max/AppData/Local/Temp/Temporary ASP.NET Files/root/8dcd52e9/53da58e/AWSSDK.DLL. LOG: Attempting download of new URL file:///C:/Users/Max/AppData/Local/Temp/Temporary ASP.NET Files/root/8dcd52e9/53da58e/AWSSDK/AWSSDK.DLL. LOG: Attempting download of new URL file:///C:/Users/Max/Documents/Visual Studio 2010/WebSites/images/bin/AWSSDK.DLL. WRN: Comparing the assembly name resulted in the mismatch: Revision Number ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated. 

I get the same error if I add bindingRedirect as indicated in the comment below.

+7
source share
2 answers

The latest version (1.5.13.0) of AWSSDK seems to have been signed with a different key than previous versions. Therefore, unfortunately, bindingRedirect will not work.

Follow these steps:

Open the package manager console (Tools> Library Package Manager> Package Manager Console) and enter:

 PM> Uninstall-Package -Force AWSSDK 

and then:

 PM> Install-Package AWSSDK -Version 1.5.12.1 

Then double check the web.config file. Make sure that it contains only binding redirects for AWSSDK:

 <dependentAssembly> <assemblyIdentity name="AWSSDK" publicKeyToken="cd2d24cd2bace800" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-1.5.12.1" newVersion="1.5.12.1" /> </dependentAssembly> 

Now your project should be good.

+7
source

Try editing the .csproj file and remove version = 1.5.9.1 from the line referenced by the awssdk assembly.

0
source

All Articles