Reputation: 5670
I need to run two versions of same Dll to be run on my website simultaneously. So i have created a folder inside Bin and shown the second Dll path like this
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="AWSSDK" culture="neutral" publicKeyToken="9f476d3089b52be3"/>
<codeBase version="2.3.40.0" href="FILE://E://Live /bin/V-2/AWSSDK.dll"/>
</dependentAssembly>
</assemblyBinding>
and added my first dll as ordinary inside bin folder. But when I try to access any function inside my AWSSDK 2.3 Dll it throws an error like this
"Could not load file or assembly 'AWSSDK, Version=2.3.41.0, Culture=neutral, PublicKeyToken=9f476d3089b52be3' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"AWSSDK, Version=2.3.41.0, Culture=neutral, PublicKeyToken=9f476d3089b52be3"
Can anyone please point out what I am doing wrong here?
Upvotes: 2
Views: 343
Reputation: 1923
This error is because may be you have different versions of ddl but there namespace will be same, and you can reference only distinct namespaces in your project.
To overcome this, Either create different namespaces for both versions or use strong names for assemblies.
Upvotes: 2