Using different versions of the same DLL in a project

In my project I have to use different versions of AWSSDK dll to do this, I took advantage of this post . and added one of my DLLs to a folder named V-1 inside the bin folder. Then make configuration 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 get an error like this

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

In this line in web-config

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

Can anyone point out what I'm doing wrong?

+4
c # dll
source share
1 answer
  • Open Solution Explorer in visual studio
  • Open Links in the project
  • Select the AWSSdk link and go to its properties.
  • Set Specific Version = True and Copy Local = False
  • Make sure your output directory does not contain this DLL.
+2
source share

All Articles