Using different versions of the same DLL in a project

3k views Asked by At

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

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

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

There are 1 answers

1
M.S. On BEST ANSWER
  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.