Where can I find GACUtil?

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")

You can run GACUtil using the Visual Studio Command Prompt. The Visual Studio Command Prompt is automatically installed with Visual Studio. To run the tool, use the Developer Command Prompt (or the Visual Studio Command Prompt in Windows 7). For more information, see Visual Studio Command Prompt.

In Windows 8.1 - On the Start screen, press CTRL + TAB to open the Apps list and then press V. The list will include all installed Visual Studio command prompts. (To open the Start screen, press the Windows logo key Windows logo on your keyboard.) Choose the Developer Command Prompt (or the command prompt you want to use).

In Windows 8 - On the Start screen, press the Windows logo key Windows logo + Z. (To open the Start screen, press the Windows logo key Windows logo on your keyboard.) Choose the Apps view icon at the bottom of the screen and then press V. The list will include all installed Visual Studio command prompts. Choose the Developer Command Prompt (or the command prompt you want to use).

In Windows 7 - Choose Start, expand All Programs, and then expand Microsoft Visual Studio. Depending on the version of Visual Studio you have installed, choose Visual Studio Tools, Visual Studio Command Prompt, or the command prompt you want to use.

GACUtil info: https://msdn.microsoft.com/en-us/library/ex0ss12c(v=vs.110).aspx

Example commands:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>cd C:\Windows\Microsoft.N et\assembly\GAC_MSIL\elite.eai.importsvc.generic.fm\v4.0_2.4.3.0__f659f54317ad7e 73\

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Elite.EAI.ImportSvc.Generic.FM\v4.0_2 .4.3.0__f659f54317ad7e73>gacutil.exe /i "elite.eai.importsvc.generic.fm.dll" Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.

Assembly successfully added to the cache


C:\Windows\assembly This is the GAC but it only references where the assemblies actually reside. Being visible hereonly indicates registration with the GAC.


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

Tags:

.Net

Dll

Gac