PC Review


Reply
Thread Tools Rate Thread

GAC Preference Order

 
 
jminiman
Guest
Posts: n/a
 
      6th Mar 2007
All,

Let's say I have two versions of the same assembly installed into GAC:

- ABC.Business_v1.0.1000_cneutral.dll
and
- ABC.Business_v1.0.1100_cneutral.dll

And I have an application that uses the ABC.Business.dll with no
specification of version. Will the application always automatically
pick the GAC file with the higher version? Or will there possibly be
room for confusion?

I'm wondering if there's an easy way to clear out the old DLLs (but
not the entire GAC!) during a CAB installation routine.

 
Reply With Quote
 
 
 
 
Ilya Tumanov [MS]
Guest
Posts: n/a
 
      8th Mar 2007
That situation is simply not possible. Application is compiled against
particular assembly version, that's the one it's going to use.

In this case if application is compiled:



1. against ABC.Business.dll with strong name version 1.0.100 it would
use this specific version or throw TypeLoadException if assembly is not
found.

2. against ABC.Business.dll with strong name version 1.0.110 it would
use this specific version or throw TypeLoadException if assembly is not
found.

3. against ABC.Business.dll with no version (not strong name signed,
can't be GAC'ed) it would use that none strong name signed version or throw
TypeLoadException if assembly is not found.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/...ramework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

"jminiman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> All,
>
> Let's say I have two versions of the same assembly installed into GAC:
>
> - ABC.Business_v1.0.1000_cneutral.dll
> and
> - ABC.Business_v1.0.1100_cneutral.dll
>
> And I have an application that uses the ABC.Business.dll with no
> specification of version. Will the application always automatically
> pick the GAC file with the higher version? Or will there possibly be
> room for confusion?
>
> I'm wondering if there's an easy way to clear out the old DLLs (but
> not the entire GAC!) during a CAB installation routine.
>



 
Reply With Quote
 
jminiman
Guest
Posts: n/a
 
      9th Mar 2007
On Mar 7, 6:23 pm, "Ilya Tumanov [MS]" <ilya...@online.microsoft.com>
wrote:
> That situation is simply not possible. Application is compiled against
> particular assembly version, that's the one it's going to use.
>
> In this case if application is compiled:
>
> 1. against ABC.Business.dll with strong name version 1.0.100 it would
> use this specific version or throw TypeLoadException if assembly is not
> found.
>
> 2. against ABC.Business.dll with strong name version 1.0.110 it would
> use this specific version or throw TypeLoadException if assembly is not
> found.
>
> 3. against ABC.Business.dll with no version (not strong name signed,
> can't be GAC'ed) it would use that none strong name signed version or throw
> TypeLoadException if assembly is not found.
>
> --
> Best regards,
>
> Ilya
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> *** Want to find answers instantly? Here's how... ***
>
> 1. Go tohttp://groups-beta.google.com/group/microsoft.public.dotnet.framework...
> 2. Type your question in the text box near "Search this group" button.
> 3. Hit "Search this group" button.
> 4. Read answer(s).
>
> "jminiman" <jaredscott...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > All,

>
> > Let's say I have two versions of the same assembly installed into GAC:

>
> > - ABC.Business_v1.0.1000_cneutral.dll
> > and
> > - ABC.Business_v1.0.1100_cneutral.dll

>
> > And I have an application that uses the ABC.Business.dll with no
> > specification of version. Will the application always automatically
> > pick the GAC file with the higher version? Or will there possibly be
> > room for confusion?

>
> > I'm wondering if there's an easy way to clear out the old DLLs (but
> > not the entire GAC!) during a CAB installation routine.


Ilya,

Thanks for your response. It's not clear to me why the if my
application is linking to a non-strong named assembly, why would it
not properly load a strong-named assembly from the GAC? I know for a
fact that this works since we've run an installation routine off a
hard reset device that only has these assemblies in GAC. My concern
is that we could reinstall and simply add to the GAC, and it would
become unclear as to which GAC instance the application would refer to.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you apply criteria in order of preference? DLL Microsoft Excel Misc 3 4th Jul 2009 12:39 PM
Manage Wireless Networks Does Not Display Preference Order Properl fiish Windows Vista Networking 6 21st Jun 2008 07:32 PM
Rate these cards in order of preference/power a_gunslinger Video Cards 3 13th Dec 2006 01:45 AM
Outlook 2003 - how do I change the search order preference? =?Utf-8?B?Q29mZmVlY3Vw?= Microsoft Outlook Discussion 1 4th Nov 2005 10:54 PM
Graph reverse order changes series order but not legend order biddlea Microsoft Excel Misc 0 13th Aug 2004 01:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:18 PM.