Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an easier way to view/search what is in the GAC?

Tags:

c#

gac

I know that Microsoft states to run

gacutil -l

from the VS command prompt to get a list.

However I am dealing with this. enter image description here

So when I run the list the display contents are all over the window and I have a total of 1649 items in the gac.
In this case I do now know what Oracal dll I need to remove. So is there an easier way to view/search what is in the GAC?

like image 704
John Doe Avatar asked Jun 30 '16 11:06

John Doe


2 Answers

Searching in c:\windows\assembly is not going to help as from .net 4.0 on wards there is a different location (%windir%\Microsoft.NET\assembly) for GAC.

See here .NET 4.0 has a new GAC, why?

gacutil is the way to go as it searches in both the locations i.e. %systemroot%\assembly and %windir%\Microsoft.NET\assembly\

For your issue you can try

gacutil -l Oracle.DataAccess (Oracle.DataAccess.dll is what I remember gets installed for Oracle Data Provider for .NET)

However above command doesn't support wild card so the assembly name should exactly match.

A hack would be to pipe the result to find command and then apply filters

gacutil.exe -l | find /I "oracle" (make sure VS command prompt is opened in admin mode)

like image 110
Ravi A. Avatar answered Sep 25 '22 23:09

Ravi A.


You can use Windows Explorer to browse the GAC. Open it up and navigate to %systemroot%\assembly:

enter image description here

You can see various details of each assembly, and pressing Del will prompt you if you want to uninstall the assembly.

like image 39
James Thorpe Avatar answered Sep 21 '22 23:09

James Thorpe