I want to view the folders and sub folders in GAC. Also want to know about adding and removing from GAC.
To install we write this lines in command prompt by opening Visual Studio command prompt
:-
gacutil /i [assembly path]
But to uninstall we need only:-
gacutil /u [assembly name]
Why?
This question is related to
.net
.net-assembly
gac
To view the files just browse them from the command prompt (cmd
), eg.:
c:\>cd \Windows\assembly\GAC_32
c:\Windows\assembly\GAC_32> dir
To add and remove files from the GAC use the tool gacutil
I'm a day late and a dollar short on this one. If you want to view the folder structure of the GAC in Windows Explorer, you can do this by using the registry:
For a temporary view, you can substitute a drive for the folder path, which strips away the special directory properties.
As for why you'd want to do something like this, I've used this trick to compare GAC'd DLLs between different machines to make sure they're truly the same.
You install as assemblies by using:
gacutil.exe
tool with the -i
option from the command line.%windir%\Assembly
(only up to .NET 3.5, CLR 2.0)You view the content of the GAC using:
gacutil.exe
tool with the -l
option.%windir%\assembly
using the Windows Explorer.Note that the (physical) GAC location has changed for .NET 4.0. It is no longer in %windir%\Assembly
, but now in %windir%\Microsoft.NET\assembly
. However, you should never write any code that depends on the physical location anyway, because given the tools available that is hardly necessary (some "cool" homegrown system diagnostics tools aside).
Launch the program "Run" (Windows Vista/7/8: type it in the start menu search bar) and type:
C:\windows\assembly\GAC_MSIL
Then move to the parent folder (Windows Vista/7/8: by clicking on it in the explorer bar) to see all the GAC files in a normal explorer window. You can now copy, add and remove files as everywhere else.
Source: Stackoverflow.com