Wow, how did you figure out how to use the Fusion APIs? Thanks!

Sam Gentile
Co-Author Wrox Professional Visual C++.NET (ISBN 1861005962 )

[EMAIL PROTECTED]
www.project-inspiration.com/sgentile
http://www.project-inspiration.com/sgentile/DotNet.htm
BLOG: http://radio.weblogs.com/0105852/
http://www.project-inspiration.com/sgentile/ScienceFiction.htm
 
 
 
 

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Mattias Sjögren
Sent: Wednesday, May 29, 2002 8:49 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] How do we programatically determine if GAC
contains particular assembly?

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.

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