在项目中使用不同版本的同一个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??
- 请在visual studio中打开解决方案资源管理器
- 打开
- 选择 AWSSdk 参考,然后转到其属性。
- 设置具体版本= True 和复制本地= False
- 确保您的输出目录不包含此dll。 >
- Please open Solution Explorer in visual studio
- Open References under the project
- Select AWSSdk reference and go to its properties.
- Set Specific Version = True and Copy Local = False
- Make sure your output directory does not contain this dll in it.