Link to home
Start Free TrialLog in
Avatar of LarsNess
LarsNessFlag for Norway

asked on

Referencing versions of DLLs

Using .NET 2.0. C#, but I guess the issue applies to VB as well.

I am having trouble understanding how to reference DLLs in other applications that can be updated on the customers system without my knowlodge. Let's say I have a program A that has a reference in source code to version 1.0 of interop.B.dll in application B. I reference version 1.0 of the DLL and includes it with my build to make it available runtime.

This works fine, until the customer updates application B and consequently also updates interop.B.dll to verson 1.1 (and maybe renders my v1.0 uncomaptible).

I'd like to not having to include the DLL with my app and read it from application B's install path, but I can't get it to work. I have tried probing (see atached code snippet) in app.config. No luck.

Can anyone help. What are the best practices in cases like this?
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <probing privatePath="c:\program files\application b\"/>
  </assemblyBinding>
</runtime>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of graye
graye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial