开发者

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

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.开发者_StackOverflow中文版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?


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.


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/


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜