lena2211
lena2211

Reputation: 111

C# update DLL without recompiling the project

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 :)

Upvotes: 11

Views: 19318

Answers (2)

Stefan Steinegger
Stefan Steinegger

Reputation: 64648

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.

Upvotes: 11

Kangkan
Kangkan

Reputation: 15571

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.

Upvotes: 10

Related Questions