Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# update DLL without recompiling the project

Tags:

c#

dll

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

like image 746
lena2211 Avatar asked May 05 '10 06:05

lena2211


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr. Stroustroupe.

Is C language easy?

C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.

Why do we write C?

We write C for Carbon Because in some element the symbol of the element is taken form its first words and Co for Cobalt beacause in some elements the symbol of the element is taken from its first second letters, so that the we don't get confuse.


2 Answers

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.

like image 56
Stefan Steinegger Avatar answered Sep 25 '22 12:09

Stefan Steinegger


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.

like image 24
Kangkan Avatar answered Sep 25 '22 12:09

Kangkan