How can I list all registered assemblies in GAC?

.NetAssembliesGac

.Net Problem Overview


How can I list all the assemblies that are in the GAC? Do I need a tool that makes it easy to view them?

.Net Solutions


Solution 1 - .Net

You can use gacutil provided with Visual Studio for that. Simply open the Developer Command Prompt (available in Start Menu>App>Visual Studio) and run the following command:

gacutil -l >yourassemblies.txt

Gacutil is also available as a separate download if you don't have/want Visual Studio.

Solution 2 - .Net

If you need the output in text-form, you can use gacutil /l.

If you need to get that list from inside, say, an installer or other tool of your own, you might want to look into the APIs to query the GAC.

Also, since originally asked, there are some projects using this API already. Just search the internet for "fusion gac .net". For example this one.

Solution 3 - .Net

You can actually navigate to the GAC via explorer or the command line and view the contents of the folder. It's location is C:\Windows\assembly.

When viewing via explorer the actual files are hidden and abstracted away, if you need to copy or extract specific versions of the dlls the command line is the way to go.

You can also turn off the namespace extension as explained here - which will make explorer act as usual in the GAC.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionpencilCakeView Question on Stackoverflow
Solution 1 - .NetdexterView Answer on Stackoverflow
Solution 2 - .NetChristian.KView Answer on Stackoverflow
Solution 3 - .Netm.edmondsonView Answer on Stackoverflow