all groups > dotnet clr > march 2007 >
You're in the

dotnet clr

group:

Version selection in CLR


Version selection in CLR nilesh.shah.uk NO[at]SPAM gmail.com
3/9/2007 4:29:18 AM
dotnet clr:
I have multiple projects that reference a dll say common.dll. Now I
would like to change common.dll in a backward compatible way and drop
it in to each of the projects so that it is used without any recompile
of the projects. However each change of common is a new version so I
need a way of indicating to the projects to allow a common.dll that is
later than a given version without explicitly giving the particular
version.

For example :

9th March
Project1, Project2 compiled and released with Common.dll v1.1.0

12th March
Common.dll compiled to v1.1.2

14th March
Common.dll compiled to v1.1.3


So would like Project1 and Project2 to be able to use v1.1.2 or v1.1.3
(not at the same time but whenever its available) without changing any
config in them.
Re: Version selection in CLR Patrick Steele
3/9/2007 9:06:31 PM
In article <1173443358.796457.274350@30g2000cwc.googlegroups.com>,
nilesh.shah.uk@gmail.com says...
[quoted text, click to view]

You should be able to drop the new DLL in the same directory as Project1
and Project2. If they're not strong-named, I don't think the version
numbers are taken into account during assembly resolving.

--
Patrick Steele
Re: Version selection in CLR David Browne
3/11/2007 10:53:16 AM


[quoted text, click to view]

Incrementing the AssemblyVersion breaks backwards compatibility. That't
what AssemblyVersion is for.

You should not ever allow a .dll to use automatic versioning for the
AssemblyVersion. The fact that Visual Studio does that by default is a bug.

The AssemblyVersion controls assembly loading, and you will break all of the
dependent assemblies every time you build. Instead hard-code
AssemblyVersion and increment it only when you want to break backwards
compatibility. Use AssemblyFileVersion to track version changes.

David
Re: Version selection in CLR Ben Voigt
3/12/2007 9:55:58 AM

"David Browne" <davidbaxterbrowne no potted meat@hotmail.com> wrote in
message news:uFKiiV$YHHA.1240@TK2MSFTNGP04.phx.gbl...
[quoted text, click to view]

I think that a manifest can be embedded into the updated dll, stating that
it is a drop-in replacement for the previous version. But I can't find the
syntax for that right now.

[quoted text, click to view]

Hardly. You should never deploy differing binaries with the same version
number.

Re: Version selection in CLR David Browne
3/12/2007 10:55:39 PM


[quoted text, click to view]

Here's the reference:
Redirecting Assembly Versions
http://msdn2.microsoft.com/en-us/library/7wd6ex19.aspx


[quoted text, click to view]

That's your choice, but may often want to deploy an updated library without
recompiling the client programs. Of course the new version should have an
incremented AssemblyFileVersion.

David
AddThis Social Bookmark Button