Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find GACUtil?

Tags:

.net

dll

gac

I know there have been many people asking the same thing, I have read all the posts related, but I couldn't find the gacutil.exe, I was looking at C:\WINDOWS\microsoft.net\Framework\v1.1.4322 and I found gacutil.exe.config but obviously it is just the config file. I need include a dll in the GAC.

this is a list from where I was looking the exe without any success:

  • C:\Program Files\Microsoft.NET
  • C:\WINDOWS\microsoft.net\Framework\v1.1.4322
  • C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

Thanks in advance.

like image 715
Leonardo Raygoza Avatar asked Mar 15 '12 18:03

Leonardo Raygoza


People also ask

Where is Gacutil exe located?

The Gacutil.exe tool is located in the . NET Framework installation directory. The default location for this is C:\Program Files (x86)\Microsoft SDKs\Windows\v10. 0A\bin\NETFX 4.6.

How do I access the GAC?

In the main menu, choose File | Open from GAC. Click Open from GAC. on the toolbar of the Assembly Explorer window. Press Ctrl+Shift+O .


2 Answers

On Windows 2012 R2 Server, if you are not allowed to install Visual Studio or SDK,
you can use powershell to register assemblies into GAC. It didn't need any special installation for me.

Set-location "C:\Temp"
 [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
 $publish = New-Object System.EnterpriseServices.Internal.Publish
 $publish.GacInstall("C:\Temp\myGacLibrary.dll")
like image 183
ritikaadit2 Avatar answered Sep 21 '22 10:09

ritikaadit2


You can find the GAC in any windows box under C:\windows\assembly\

or %windir%\assembly

GACUTIL -i filename registers the file with the GAC but doesn't necessarily locate the file inside the %windir%\assembly folder. This is a virtual folder controlled by SHFUSION.DLL which is a plugin windows explorer uses to display those files.

Further Reading Here

If you can't simply type GACUTIL /? from a cmd prompt. You can navigate in windows to the assembly sub folder of windows dir and drag/drop the dll inside that folder. You'll need to be an administrator of the pc to do this.

Typically to access this utility I fire up the VS 2010 Command Prompt as it has the appropriate %PATH% variable settings to locate the gacutil cmd.

On my box, I have 4 copies... First one is located here. C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64

The issue most likely is that you don't have the framework sdk for the 1.1 framework installed on the box you're trying to do this on. You can download that here

like image 45
William Dwyer Avatar answered Sep 20 '22 10:09

William Dwyer