Assembly versioning and product updates

G

Guest

I have an application that is comprised of multiple dll's and exe's, all with
strong names. Let's say that all of these applications use a utility library
Utility.dll, and let's say the version of Utility.dll is 1.0.0.0.

I then make a small change to the Utility library, which I want to push out
to uses in the form of a patch. Since it's a minor change, I increment the
version of the Utility assembly to 1.0.0.1.

What I'd like to do is simply push out a fresh copy of Utility.dll.
However, because everything is strong-named, none of the other assemblies
that depend on Utility.dll will accept it, because their manifests all say
they depend on version 1.0.0.0. So instead of pushing out a single file, I
have to push out the whole darn bag o' bits.

Is there some way I can specify that I only want the .NET dependency checker
to look at the major and minor rev in the assembly version number, so that I
can push out minor fixes without needing to push out everything?
 
K

Kevin Yu [MSFT]

Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to assemblies reference to
newer build of you assembly instead of the old one. If there is any
misunderstanding, please feel free to let me know.

As far as I know, if your project reference to an assembly which is not
available, the .NET framework will look for the nearest version. Also you
could add some settings in app.config file to make some version to be the
default version your assembly references. For example:

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyAssembly2" culture="neutral"
publicKeyToken="307041694a995978"/>
<codeBase version="1.0.1524.23149"
href="FILE://C:/Myassemblies/MyAssembly2.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

For more information, you can try to check the following link:

http://support.microsoft.com/default.aspx?scid=kb;en-us;837908

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
R

Richard Grimes [MVP]

Dathon said:
I then make a small change to the Utility library, which I want to
push out to uses in the form of a patch. Since it's a minor change,
I increment the version of the Utility assembly to 1.0.0.1.

What I'd like to do is simply push out a fresh copy of Utility.dll.
However, because everything is strong-named, none of the other
assemblies that depend on Utility.dll will accept it, because their
manifests all say they depend on version 1.0.0.0. So instead of
pushing out a single file, I have to push out the whole darn bag o'
bits.

Yup, that's the way its designed to work!
Is there some way I can specify that I only want the .NET dependency
checker to look at the major and minor rev in the assembly version
number, so that I can push out minor fixes without needing to push
out everything?

Well, sort of. If the utility.dll assembly is installed in the GAC you can
install a publisher policy file into the GAC which will redirect all
requests for 1.0.0.0 to 1.0.0.1 for all applications. Publisher policy files
are really only intended for critical changes like security updates. See
http://www.grimes.demon.co.uk/workshops/fusWSSix.htm for details.

For individual applications you can redirect versions through the
application's config file
(http://www.grimes.demon.co.uk/workshops/fusWSThree.htm).

However, the intended way to update assemblies is as you say to "push out
the whole darn bag o' bits"

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top