Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 771
Vineet Avatar asked Feb 02 '10 06:02

Vineet


People also ask

How do I check if a DLL is registered in the GAC?

You can actually navigate to the GAC via explorer or the command line and view the contents of the folder. It's location is C:\Windows\assembly. When viewing via explorer the actual files are hidden and abstracted away, if you need to copy or extract specific versions of the dlls the command line is the way to go.

How do I manually register a DLL?

Click Start > All Programs > Accessories and right-click on "Command Prompt" and select "Run as Administrator" OR in the Search box, type CMD and when cmd.exe appears in your results, right-click on cmd.exe and select "Run as administrator" At the command prompt, enter: REGSVR32 "PATH TO THE DLL FILE"


1 Answers

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.

like image 104
Fredrik Mörk Avatar answered Sep 28 '22 04:09

Fredrik Mörk