Sam,

>I have an installer program that needs to know whether PIAs are already
>installed in the GAC so that I won't install them twice. So the question is
>how can we programmatically tell whether the GAC contains a particular
>assembly?

Well, one way is to use the Fusion APIs. That way, you don't actually have 
to load the assembly. I have a sample of that at 
http://www.msjogren.net/dotnet/eng/samples/misc.asp


>The third article says that if you want to load an assembly from the GAC as
>opposed to just from the app directory, you need to call
>Assembly.LoadWithPartialName rather than Assembly.Load.

That's true if you only have a partial assembly name. If you know the whole 
thing, including name, culture, version and public key token, you should 
use Assembly.Load().


Mattias

===
Mattias Sjögren
[EMAIL PROTECTED]

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to