tags:

views:

946

answers:

4

Is there a way to use PowerShell to view the contents of the GAC?

A: 

You can do it just from a command prompt:

cd C:\Windows\assembly
dir

The GAC has a specific directory structure, and you should not go moving or deleting things in there using the command prompt - rather use windows explorer (gui) or gacutil (cli)

Tom Ritter
+5  A: 

To list entries in the GAC;

gacutil -l

In powershell you could parse the text output of the above. I don't know of a managed interface to inspect the GAC.

Cheeso
+8  A: 

Another option is that the PowerShell Community Extensions installs a GAC provider, so you can do this:

dir gac:

If you are on PowerShell V2, be sure to grab the 1.2 Beta.

Keith Hill
kewl. I did not know about that.
Cheeso
A: 

Hi All,

If you are using Visual Studio 2010 I would suggest you to use Muse VSReferenses Dialog Here is an example

alt text

All the best

Muse VSExtansions

Muse VSExtensions
Not really an answer to the question. And are you sure this is not a shameless plug?
Lars Truijens