.NET Framework - Updating a reference

Asked By Anders Eriksson on 01-Jun-11 03:42 PM
If I have a reference, a dll , and I update the actual dll file to a new
version. Will VS 2010 automatically use the new file or do I have to do
anything?

The file is located in the same directory and have the same name, but it
can contain new classes and functions

// Anders


Big Steel replied to Anders Eriksson on 01-Jun-11 04:10 PM
If you were using project reference and all the projects were in the
same solution, you would not have to do anything .NET will take care of
placing the new DLL in the correct spot to be used by the program that
has reference to the DLL.


If the classlib project is its own separate standalone project, then you
have to copy the new DLL to the area where the program using the DLL can
access the new DLL. You can have multiple versions of the same named DLL
in a location that is the advantage you have with .NET, other wise, if
it is a COM solution DLL, then the DLL has to be registered with the O/S
and with only one pointer is the registry for any given DLL.
Peter Duniho replied to Anders Eriksson on 02-Jun-11 01:53 AM
As long as the DLL was working before, and as long as the DLL reference
in your project does not stipulate that the DLL has to be the exact
version with which it was compiled, and as long as the new DLL does not
break any of the API that the project was using, then the new DLL will
work in place of the old one.

Pete