在项目中使用不同版本的同一个DLL

在项目中使用不同版本的同一个DLL

问题描述:

在我的项目中,我必须使用不同版本的 AWSSDK dll,以便使我得到这篇文章。并将我的一个dll添加到bin文件夹内的名为 V-1 的文件夹中。然后进行这样的配置更改

In my project I have to use different versions of AWSSDK dll's, in order to make this i took help of this post . and added one of my dll in to a folder named V-1 inside bin folder. Then made config changes like this

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>        
        <assemblyIdentity name="AWSSDK" publicKeyToken="CD2D24CD2BACE800" culture="neutral" />
            <codeBase version="1.4.8.2" href="V-1\AWSSDK.dll" />
            <codeBase version="2.3.40.0" href="AWSSDK.dll" />
        </dependentAssembly>      
    </assemblyBinding>
</runtime>

但是我仍然收到这样的错误

But I still gets the error like this

错误2无法加载文件或程序集AWSSDK,Version = 1.4.8.2,Culture = neutral,PublicKeyToken = cd2d24cd2bace800或其一个依赖项。该系统找不到指定的文件。 E:\Live \Web.config 129

Error 2 Could not load file or assembly 'AWSSDK, Version=1.4.8.2, Culture=neutral, PublicKeyToken=cd2d24cd2bace800' or one of its dependencies. The system cannot find the file specified. E:\Live \Web.config 129

在web-Config中的这一行

At this line in web-Config

 <add assembly="AWSSDK, Version=1.4.8.2,  Culture=neutral, PublicKeyToken=CD2D24CD2BACE800" />

任何人都可以指出我做错了什么?

Can anyone please point-out what I am doing wrong??


  1. 请在visual studio中打开解决方案资源管理器

  2. 打开

  3. 选择 AWSSdk 参考,然后转到其属性。

  4. 设置具体版本= True 复制本地= False

  5. 确保您的输出目录不包含此dll。 >
  1. Please open Solution Explorer in visual studio
  2. Open References under the project
  3. Select AWSSdk reference and go to its properties.
  4. Set Specific Version = True and Copy Local = False
  5. Make sure your output directory does not contain this dll in it.