Can I download and install gacutil.exe without having to install VS or the SDK?

101,348

Solution 1

Per Hans' comment on my question, it's against the license. The best thing to do here is to create a quick setup.exe or msi which will install the files into the GAC, which I have done.

Solution 2

I got it working by copying gacutil.exe, gacutil.exe.config and gacutlrc.dll. I understand it's against the licence, but you can't get InstallShield in VisualStudio Express so this was the simplest solution.

Solution 3

Old question, but in a pinch on a machine that doesn't have the SDK installed, as long as PowerShell is available you can do this:

#Note that you should be running PowerShell as an Administrator
[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:\Path\To\DLL.dll")

From https://www.andrewcbancroft.com/2015/12/16/using-powershell-to-install-a-dll-into-the-gac/

Solution 4

Also an alternative is to just manually drag and drop the DLL into c:\windows\assembly.

For .net 4, I believe the assembly folder is c:\windows\microsoft.net\assembly - though I haven't tested a simple xcopy addition in this manner on .net 4.

Share:
101,348
richard
Author by

richard

I love this site. I am here to learn, and try to contribute back as much as possible. As an aside, I can't thank everyone on this site enough for their answers. This site (and it's sister sites through SE) are INVALUABLE.

Updated on April 06, 2020

Comments

  • richard
    richard about 4 years

    I want an administrator to register some DLLs for me, but he would probably prefer not to install the whole SDK.

    Can he just install gacutil.exe? If so, where can he get it? Do I just email the gacutil.exe file to him, and where does he have to put it on his machine to use it?