11

I have written a small program with a reference to a dll file that will be included in the setup file.

What I still need is a way to update the dll (in case I change some functions), without the need to re-download the whole program again, just replace the dll file...

Is this possible ?

I just read somewhere that I have to update the xml file with the new dll version, but I really need the full steps to update the dll successfully...

Any help is really appreciated... Thanks a lot


Update

I really don't know what to say... Both ways are really great... Thanks a lot for the help... I will test them tonight and write the answer here...

Thanks again :)

Vladislav Povorozniuc
  • 2,149
  • 25
  • 26
lena2211
  • 111
  • 1
  • 1
  • 3

2 Answers2

11

If you already distributed your application, you can redirect the assembly binding by configuration.

You can redirect an assembly binding reference to another version of an assembly by using entries in the application or machine configuration files. You can redirect references to .NET Framework assemblies, third-party assemblies, or assemblies of your own application.

http://msdn.microsoft.com/en-us/library/2fc472t2%28VS.71%29.aspx

Another article about Configuring Assembly Binding Redirection.

Stefan Steinegger
  • 63,782
  • 15
  • 129
  • 193
10

When you add a reference to a DLL, the visual studio takes binds it to the specific version (in case of 'Copy local' is true). Go to visual studio project, select the reference and view properties. You will see a property as 'Specific version'. The value will be true, set it to false. You have got what you wished.

Kangkan
  • 15,267
  • 10
  • 70
  • 113
  • I have tried this method, "Specific Version" is already set to false. But still I am getting the error whereas Assembly binding redirection in the config file is working fine. Any idea what I am doing wrong? – vijay Sep 12 '13 at 10:11
  • @vijay: Can you be more specific and elaborate what you did and where you are encountering some error? – Kangkan Sep 12 '13 at 12:45
  • I have checked the "Specific Version" is already set false. So I replaced the old dll with a newer version, when running the program, it throws the errors saying it is looking for the old referenced dll which is not found. [here is the question I have posted here](http://stackoverflow.com/questions/18757495/upgrading-dependent-dll-without-recompiling-the-whole-application) – vijay Sep 13 '13 at 05:20