Posted  by 

Windows Server 2012 Gacutil

2012

Gacutil.exe: The term 'gacutil.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Is there some other way to add assemblies in Server 2012? Sep 18, 2014  Prior to Windows Server 2012, gacutil is typically used to install DLL files in the Windows Global Assembly Cache (GAC). With Windows Server 2012 unfortunately it's not quite so easy. Being able to simply open the GAC in Explorer and drag/drop is gone (so yeah, no shell!). Also GacUtil.exe is not present on the server by default as part of runtime. Jun 01, 2013  Where is gacutil on Windows Server 2012. You could learn this blog where is gacutil.exe, it will give you some tips about that. Kvh gacutil.exe: The term 'gacutil.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.

21 Oct 2015CPOL
This article outlines the steps for installing the Global Assembly Cache Tool on Windows Server 2008.

Problem

Gacutil Windows Server 2016

I have a customer using Windows Server 2008 for hosting its ASP.NET web applications. The operating environment on the server is kept very clean and lightweight, so only the bare necessities are installed. For example, there are no office productivity tools (like Office) or integrated development tools (like Visual Studio) installed in these environments. This is definitely a good practice; it keeps the potential attack surface small, and it helps to ensure that the server runs as fast as possible, without any potential for bogging down due to unnecessary programs or processes.

All of the web applications on this particular server rely on a Microsoft.NET assembly from a third-party software component vendor. The assembly DLL file is over 14 MB, which is relatively large, so we decided to move the DLL into the Global Assembly Cache (GAC) so it can be shared by all applications. Previously, a copy of the DLL was installed in the bin directory for every application that used it. This was wasteful of resources, and more difficult to maintain when the vendor released updates to the assembly.

You will recall the global assembly cache is machine-wide code cache that stores assemblies that are specifically intended for sharing by several applications on the computer. The Global Assembly Cache Tool (gacutil.exe) allows you to install assemblies into the cache, remove them from the cache, and list the contents of the cache. Using the tool to install an assembly into the cache is simple:

I cant format my hard drive windows 10. The problem is that formatting can't be performed successfully and gives error message 'Windows was unable to complete the format'.For the moment, the USB flash drive turns inaccessible and can't be formatted.

2012

However, the gacutil executable did not exist anywhere on the server.

Windows Server 2012 Gacutil.exe

According to Microsoft, gacutil.exe is considered to be a development tool. Because of this, it is contained in the .NET SDK and not in the .NET redistributable. Google plus app download. Visual Studio comes with the SDK, so if you have Visual Studio installed, then this tool is installed with it. For example, on my development machine, the executable file is located here:

The application server has the .NET redistributable installed, but it does not have the .NET SDK installed, therefore this folder did not exist on the server, and there was no gacutil.exe.

Solution

Gacutil Windows 2012 R2

One solution is to download and install the Microsoft Windows SDK for Windows 7 and .NET Framework 4. Version 7.1, published on May 19 of 2010, is available for free download here:

After downloading winsdk_web.exe, you can run the program with administrator permissions, and select the .NET Installation Options.

Windows Server 2012 R2 Gacutil Location

The installation takes a few minutes to run, and after it completes, the Global Assembly Cache Tool is ready to use.

I found this to be the simplest solution, although there are alternatives for adding assemblies to the GAC without installing the .NET SDK and without using gacutil.exe at all:

  • If you have developed the application yourself, you can use the GacInstall method. For more information, refer to the class documentation for System.EnterpriseServices.Internal.Publish.
  • Create a PowerShell script that wraps the Publish.GacInstall function. Here is one example.
  • Create a Microsoft Installer (MSI) package to deploy the assembly. Microsoft provides help documentation for this, and instructive tutorials are also available.

Windows Server 2012 R2 Gacutil.exe