How to view folder and files in GAC?

I want to view folders and subfolders in the GAC . I also want to know about adding and removing from the GAC .

For installation, we write these lines on the command line, opening the Visual Studio command prompt : -

gacutil /i [assembly path]

But for removal we only need: -

gacutil /u [assembly name]

Why?

+74
.net-assembly gac
Feb 29 '12 at 11:26
source share
5 answers

Installation:

 gacutil -i "path_to_the_assembly" 

View:

Open in Windows Explorer folder

  • .NET 1.0 - NET 3.5: c:\windows\assembly ( %systemroot%\assembly )
  • .NET 4.x: %windir%\Microsoft.NET\assembly

OR gacutil –l

When you are going to install the assembly, you must indicate where gacutil can find it, so you must also provide the full path. But when the assembly is already in the GAC - gacutil knows the path to the folder, so you just need the assembly name.

MSDN:

+99
Feb 29 '12 at 11:28
source share
— -

I'm late for the day and this short dollar. If you want to view the GAC folder structure in Windows Explorer, you can do this using the registry :

  • Run regedit.
  • Go to HKLM \ Software \ Microsoft \ Fusion
  • Add a DWORD called DisableCacheViewer and set the value to 1.

For temporary viewing, you can replace the drive for the folder path, which removes the special properties of the directory.

  • Run the command line at the privilege level of your account.
  • Type SUBST Z: C: \ Windows \ assembly
    • Z can be any free drive letter.
  • Open My Computer and look in the new substitute directory.
  • To remove the virtual disk from the command line, enter SUBST Z: / D

As for why you would like to do something like this, I used this trick to compare GAC'd DLLs between different machines to make sure they are really the same.

+43
Aug 14 '13 at 21:50
source share

Launch the Run program (Windows Vista / C:\windows\assembly\GAC_MSIL : type it in the search bar on the Start menu) and type: C:\windows\assembly\GAC_MSIL

Then go to the parent folder (Windows Vista / 7/8: clicking on it in the Explorer panel) to view all the GAC files in a regular Explorer window. Now you can copy, add and delete files, as elsewhere.

+27
May 21 '14 at 6:19 06:19
source share

To view files, just view them on the command line ( cmd ), for example:

 c:\>cd \Windows\assembly\GAC_32 c:\Windows\assembly\GAC_32> dir 

To add and remove files from the GAC, use the gacutil tool

+7
Feb 29 '12 at 11:30
source share

You install as assemblies using:

  • The installer that you create for your application.
  • Using the gacutil.exe tool with the -i option from the command line.
  • Removing an assembly in %windir%\Assembly (only until .NET 3.5, CLR 2.0)

You are viewing the contents of the GAC using:

  • The gacutil.exe tool with the -l option.
  • For .NET 2.0, 3.0, and 3.5 (CLR 2.0) view on %windir%\Assembly using Windows Explorer.

Note that the (physical) location of the GAC has changed for .NET 4.0. It is no longer in %windir%\Assembly , and now is in %windir%\Microsoft.NET\assembly . However, you should never write any code that depends on the physical location in any case, because this affordable tool is hardly necessary (some "cool" tools for diagnosing home-grown systems).

+4
Feb 29 '12 at 11:32
source share



All Articles