是否有可能忽略集清单不匹配? [英] is it possible to ignore assembly manifest mismatch?

查看:186
本文介绍了是否有可能忽略集清单不匹配?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用一对情侣在我的asp.net网站库,我使用的NuGet拉动。

I am trying to use a couple of libraries in my asp.net website that I pulled in using NuGet.

问题是我收到此错误:

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

一,我试图用需要使用AWSSDK但显然它正在寻找一个旧版本的库我不能再进去。

One of the libraries I am trying to use needs to use the AWSSDK but apparently it is looking for an older version I can no longer get.

是否有可能忽略这个错误?

Is it possible to ignore this error?

这是一个全新的网站,在它没有code然而,正是已经被拉到的NuGet中,web.config中是空的。

This is a brand new website with no code in it yet, just what has been pulled in by NuGet, the web.config is empty.

我添加融合日志和现在我得到:

I added Fusion logging 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.

我得到同样的错误,如果我添加一个bindingRedirect如在下面的评论中提到。

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

推荐答案

最近(1.5.13.0)发布AWSSDK似乎已经与超过previous发布一个不同的密钥签名。所以,不幸的是,bindingRedirect将无法工作。

The latest (1.5.13.0) AWSSDK release seems to have been signed with a different key than the previous releases. So unfortunately a bindingRedirect won't work.

步骤如下:

打开包管理器控制台(工具>库软件包管理器>软件包管理器控制台),然后键入:

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

PM> Uninstall-Package -Force AWSSDK

依次为:

PM> Install-Package AWSSDK -Version 1.5.12.1

然后仔细检查你的web.config文件。确保它只包含以下绑定重定向为AWSSDK:

Then double check your web.config file. Make sure that it only contains the following binding redirect 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 to go.

这篇关于是否有可能忽略集清单不匹配?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆