468,248 Members | 1,475 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,248 developers. It's quick & easy.

GAC assembly versioning QFE behavior

I am trying to get QFE (Quick Fix Engineering) working with an assembly
installed in the GAC. I have two books that claim if two different versions
of the assembly are installed in the GAC -AND- they vary only by revision
number, then the default policy is to load the higher number version. I am
not able to reproduce this behavior in practice.

My test case is simple. I wrote a class with AssemblyVersion 1.0.0.1.
Installed into GAC. Created a console application that reference this
assembly to verify it works. I then created a second assembly (with the same
assembly name) and made it version 1.0.0.2. I installed this into the GAC.
I verified that both version exist by using the GUI viewer for the GAC. I
then reran my console application without recompiling. It is still using the
1.0.0.1 version (the class I built returns the version number so I know this
for certain).

So my question is why won't the CLR recognize that a newer version is
available and automatically start using it?

Thank You
--
James Tyner
..NET Developer
Mar 24 '06 #1
1 1049
Whatever version was compiled against will be used. So if a program was
compiled against version 1.0.0.0, it won't care that 2.0.0.0 is there. It
can only run on 1.0.0.0.

To override that, you can have publisher policy files that 'redirect' to a
newer version. But this is not automatic.

I'm not sure what books you are using, but either they are wrong, or you are
misinterpreting something.

"jtyner" <jt****@discussions.microsoft.com> wrote in message
news:53**********************************@microsof t.com...
I am trying to get QFE (Quick Fix Engineering) working with an assembly
installed in the GAC. I have two books that claim if two different
versions
of the assembly are installed in the GAC -AND- they vary only by revision
number, then the default policy is to load the higher number version. I
am
not able to reproduce this behavior in practice.

My test case is simple. I wrote a class with AssemblyVersion 1.0.0.1.
Installed into GAC. Created a console application that reference this
assembly to verify it works. I then created a second assembly (with the
same
assembly name) and made it version 1.0.0.2. I installed this into the
GAC.
I verified that both version exist by using the GUI viewer for the GAC. I
then reran my console application without recompiling. It is still using
the
1.0.0.1 version (the class I built returns the version number so I know
this
for certain).

So my question is why won't the CLR recognize that a newer version is
available and automatically start using it?

Thank You
--
James Tyner
.NET Developer

Mar 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Henrik Skak Pedersen | last post: by
5 posts views Thread by mekim | last post: by
11 posts views Thread by Just Me | last post: by
6 posts views Thread by Nak | last post: by
6 posts views Thread by Gavin Sullivan | last post: by
6 posts views Thread by Ben | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.