GAC versioning issues

J

Juan de Ituarte

Hi there,

I have a problem with an assembly deployed in GAC. First of all, a
little scenario description:

We develop (small) WEB apps that use an assembly for connecting with
our databases. This assembly has evolved from 1.1 to 1.3 version.

The problem:
I've installed the two assemblies in GAC, apparently without problems,
because version label is different but PublicKeyToken is the SAME for
both.

The point is that the Runtime seems to see no difference between them
because in an application which uses both (in differente projects)
there is an error when trying to invoke a method present in the older
but not in the new one. The exception is System.MissingMethodException
because is trying to look for the method in the new assembly (1.3)
when this invocation is made in the project which references (in
VS.NET) the previous version (1.1) which HAS the method.

As I say references seem to be okay, in fact when coding VS.NET's
Intellisense see the difference between both assemblies but for GAC is
the same!!! Even when the version number is different!!!

What am I doing wrong? Maybe having the same PublicKeyToken?

Thanks a lot in advance for any help!!!

Juan de Ituarte
 
B

Brock Allen

The point is that the Runtime seems to see no difference between them
because in an application which uses both (in differente projects)
there is an error when trying to invoke a method present in the older
but not in the new one. The exception is System.MissingMethodException
because is trying to look for the method in the new assembly (1.3)
when this invocation is made in the project which references (in
VS.NET) the previous version (1.1) which HAS the method.

So if your client application was using 1.1 and you're getting 1.3 this mean
a version redirect is happening. Some configuration file somewhere is configured
to always load the new version. Ahat version are you referencing in web.config
or in your <%@Assembly %> reference? Here's how you'd specify which version
to use:

http://msdn.microsoft.com/library/d.../cpgenref/html/gngrfassemblies.asp?frame=true

Is this component a thrid party component? It's possible they shipped a publisher
policy with the assembly which causes the redirect, so you'd want to disable
their policy file. Here's how you'd disable a publisher policy:

http://msdn.microsoft.com/library/d.../en-us/cpgenref/html/gngrfpublisherpolicy.asp
 

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

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top