By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,041 Members | 1,018 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,041 IT Pros & Developers. It's quick & easy.

GAC assembly versioning QFE behavior

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.