473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

get a listing of assemblies from GAC ?

Hi,

How can I in a program obtain the list of assemblies installed in GAC ?
Is it also possible to get this list based on certain assembly properties
such as all assemblies referencing a specific assembly also ?

I wish to do so using VB.Net (in VS2003)

--
Ravi Shankar
Mar 8 '06 #1
4 3382
>How can I in a program obtain the list of assemblies installed in GAC ?

Fusion provides a COM based API for working with the GAC. See
http://www.msjogren.net/dotnet/eng/s...et_gactool.asp

Is it also possible to get this list based on certain assembly properties
such as all assemblies referencing a specific assembly also ?


No, you'd have to load each assembly found and check its assembly
refs.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Mar 8 '06 #2
Hi Ravi,

You can use code to browse in the c:\windows\assembly directory because all
the GAC assemblies are there. Actually, the GAC utility is using this
method to get the list of assemblies.

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

Mar 9 '06 #3
You can use code to browse in the c:\windows\assembly directory because all
the GAC assemblies are there.
Not directly, they are in different subdirectories of that directory.
But that's an implementation detail. Surely you don't want to depend
on something like that when there's a published API for working with
the GAC.

Actually, the GAC utility is using this method to get the list of assemblies.


Which GAC utility? AFAIK, both Gacutil.exe and the Shell extension
uses the fusion APIs.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Mar 9 '06 #4
Hi Mattias,

I had downloaded and read the KB 317540 you mention on the site. You also
mention that the SHfusion.dll API are not documented or shfusion exposes the
API as defined in the KB ?

The base intent is to get a dropdown in VS (design time) for a component I'm
writing where I wish to expose a property that permits uses to select a
deployed assembly. There is perhaps a default type (datatype) I could use to
enable the "Property Browser" in VS to pop up this list ? I assumed there
wouldn't be anything like this so I'd need to write my own UI to popup this
list.
--
Ravi Shankar
"Mattias Sjögren" wrote:
How can I in a program obtain the list of assemblies installed in GAC ?


Fusion provides a COM based API for working with the GAC. See
http://www.msjogren.net/dotnet/eng/s...et_gactool.asp

Is it also possible to get this list based on certain assembly properties
such as all assemblies referencing a specific assembly also ?


No, you'd have to load each assembly found and check its assembly
refs.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Mar 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tom Dacon | last post by:
If you're not putting assemblies in the GAC, but are referencing shared code with copylocal=true into the projects that use them, is there any value to signing the assemblies? In the environment...
1
by: Afaq | last post by:
Hi, After adding large number of empty resource files (which will be updated later), we are not able to compile the project. the following is the output of the build process. It fails while...
3
by: David Jacques | last post by:
I am trying to get a list of all files of a certain extension type on disk to do some processing in a loop. The code needs to be portable to UNIX, so I need to use plain c functionality. Does...
8
by: Charles Law | last post by:
I'm sorry to keep harping on about this one, but it is really quite important for me to be able to list _all_ required assemblies in my Help About box. Herfried kindly posted some code before that...
6
by: Pete Kane | last post by:
Hello all, how do I get a directory listing from a web server ?, I'm playing around with reflection and "Click once" deployment and would like to loop through a directory listing and use...
3
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source...
6
by: =?Utf-8?B?LnBhdWwu?= | last post by:
how do i list all available functions in an unmanaged .dll? i tried using reflection, but that seems to only work with managed assemblies
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
4
by: illegal.prime | last post by:
Hi all, I'm getting unexpected results when trying to preload assemblies into an AppDomain I'm creating. Upon creation of the AppDomain - I attach an AssemblyResolve to both my current AppDomain...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.