How do I register a .NET DLL file in the GAC?

Vineet picture Vineet · Feb 2, 2010 · Viewed 294.9k times · Source

I have made a .NET .DLL file, which I want to register in the GAC.

I have used this command in Windows Server 2003 Command Prompt:

C:\"Path of dll"\>gacutil /i dllname.dll
'gacutil' is not recognized as an internal or external command,
operable program or batch file.

It says the path is not correct.

Do I need to use this in a .NET cmd prompt? If it is that, I am not able to locate the .NET cmd prompt.

Answer

Fredrik Mörk picture Fredrik Mörk · Feb 2, 2010

You can do that using the gacutil tool. In its simplest form:

gacutil /i yourdll.dll

You find the Visual Studio Command Prompt in the start menu under Programs -> Visual Studio -> Visual Studio Tools.