我可以下载并安装 gacutil.exe 而无需安装 VS 或 SDK 吗?

发布于 2024-10-31 00:27:46 字数 164 浏览 7 评论 0原文

我希望管理员为我注册一些 DLL,但他可能不希望安装整个 SDK。

他可以只安装gacutil.exe吗?如果有的话,他可以从哪里得到呢?我是否只需通过电子邮件将 gacutil.exe 文件发送给他,他必须将其放在计算机上的什么位置才能使用它?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

会傲 2024-11-07 00:27:46

我通过复制 gacutil.exegacutil.exe.configgacutlrc.dll 使其工作。我知道这是违反许可证的,但是您无法在 VisualStudio Express 中获得 InstallShield,因此这是最简单的解决方案。

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.

老问题,但在没有安装 SDK 的机器上,只要 PowerShell 可用,您就可以执行以下操作:

#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")

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

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/

毁梦 2024-11-07 00:27:46

根据汉斯对我的问题的评论,这是违反许可证的。这里最好的做法是创建一个快速 setup.exe 或 msi,它将文件安装到 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.

梨涡少年 2024-11-07 00:27:46

另一种替代方法是手动将 DLL 拖放到 c:\windows\Assembly 中。

对于 .net 4,我相信程序集文件夹是 c:\windows\microsoft.net\ assembly - 尽管我还没有在 .net 4 上以这种方式测试简单的 xcopy 添加。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文