How can I list all the assemblies that are in the GAC?开发者_JS百科 Do I need a tool that makes it easy to view them?
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.
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.
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.
精彩评论