tags:

views:

44

answers:

1

I got a complete vs2005 project from our sub-contractor, which depends on several of their other projects. I didn't get those projects' source files, but I do have their dlls in the bin/debug folder (lets call them a.dll and b.dll). I copied those dlls into a \lib folder, and changed the references to point there. The problem I have now is that a.dll and b.dll depend on a specific version of a product we are developing upon, and our system here has a different version installed.

Is there a simple enough way to open a.dll and b.dll and change their manifest to target our version of the product? Or better yet - make them not depending on a specific version?

A: 

Can you use Assembly Binding Redirection to make the required versions actually load the versions you've got?

e.g. in your app.settings file, have something like this:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="myAssembly"
                          publicKeyToken="32ab4ba45e0a69a1"
                          culture="en-us" />
        <bindingRedirect oldVersion="1.0.0.0"
                         newVersion="2.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Jon Skeet
It didn't seem to work. Is it supposed to work even when my project depends on a.dll, which depends on a specific version of (Let's admit it...) - ESRI.ArcGIS.System? When I add this section to the app.config of my own project, should it affect what a.dll is looking for in compile time?
Noam Gal
And another thing - a.dll depends on version 9.3. I have version 9.2 - can I redirect like this to a lower version?
Noam Gal
Yes, it should affect what a.dll looks for. However, it seems like a very bad idea to try to use a *lower* version. What if it uses new functionality in 9.3?
Jon Skeet