Add DLL to the GAC in Windows 2008

May 31st, 2010 by Terence Leave a reply »

Pre-Windows Server 2008 was easy enough to install new DLL files to the GAC. As simple as dragging-and-dropping to the C:\Windows\Assembly folder. In Windows Server 2008, however, when attempting to drag-and-drop, an Access Denied error appears similar to the following.

AssemblyCacheViewerAccessDenied

So, how do we install new DLL files into the GAC without Windows Installer? Using one of the following ways:

  • Use gacutil.exe; or
  • Disable User Account Control

Use GACUtil.exe

1. Download and install Windows SDK 6.1 (Free from Microsoft – Download).

NOTE: During the setup of Windows SDK, you only need to select the .Net Development Tools

WindowsSDKInstallDotNetTools

2. Open Command Prompt as Administrator.

3. Type the following command. Enter the DLL file location after the /i switch (eg. C:\Temp\newassembly.dll)

64 bit

“C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\x64\gacutil.exe” /i

32 bit

“C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\gacutil.exe” /i

Disable User Account Control

This is not the recommended solution to this issue as disabling User Account Control decreases security on your server.

1. Disable User Account Control and restart the server. You will then be able to drag-and-drop the DLL files into the Assembly folder.

Advertisement

Leave a Reply