0

In visual studio we reference an external dll in our project with the option copy local to true. The problem is that the client may have a different version of that dll in their system and in that case our app has to use their dll.

Is there a way in our visual studio project to specify the order in which it have to search for the dll at runtime?

Example:

  1. Search in C:\Program Files\RuntimeX\runtime.dll
  2. Search in current .exe folder

Clarification:

In this article they refer to the task i want to do, but i cannot find the technical part of how you configure the binding priority order.

How are references located in .NET? Part: Runtime Reference Resolution (aka binding)

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
VSP
  • 2,367
  • 8
  • 38
  • 59
  • Do consider not running Visual Studio on the other system. It is not very common to include VS when you deploy your app. If you conditionally need to copy a DLL then you have to do so with a post-build event. – Hans Passant Feb 01 '17 at 18:31
  • @HansPassant i didnt mean to say that we run Visual Studio on the client system, we want to specify to our .exe when it runs at the client machine in which order it should try to locate the required .dll, first in their program files and if not found there then in our .exe base folder... – VSP Feb 02 '17 at 11:22
  • Modify your installer, and let it copy the latest version from client machine to the installation folder if needed. – Lex Li Feb 25 '19 at 17:06

0 Answers0