如何在没有 .NET SDK 或 Visual Studio 的情况下安装 .net dll?

发布于 2024-07-09 18:47:47 字数 207 浏览 6 评论 0原文

我需要部署一些.net dll。 它们需要放入 GAC 中,并且所需的条目需要位于注册表中。 在我的机器上,我同时运行了 SDK 和 Visual Studio,因此目前我正在使用 gacutil 和 regasm 等 .net sdk 工具。 但是,当我需要在客户机器上安装这些dll时,我该怎么做呢? 我可以通过仅使用 .net 运行时来完成此任务吗? 我目前正在使用.net 2.0。

I need to deploy a few .net dlls. They need to be put in the GAC and the required entries need to be in the registry. On my machine I have both the SDK and Visual Studio running, so currently I am utilizing .net sdk tools like gacutil and regasm. However, when I need to install these dlls on a customer machine, how should I go about it. Can I accomplish this by just having the .net runtime. I am currently using .net 2.0.

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

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

发布评论

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

评论(3

浊酒尽余欢 2024-07-16 18:47:47

执行此操作的“正确”方法是使用 MSI(通过制作 MSI 文件的各种方法之一 - 例如 WiX)

这可能对您有用:

http://blogs.msdn.com/astebner/archive /2006/11/04/为什么不使用-gacutil-exe-in-an-application-setup.aspx

The 'proper' way to do this is using MSI (via one of the various ways of making MSI files - like WiX)

This might be useful to you:

http://blogs.msdn.com/astebner/archive/2006/11/04/why-to-not-use-gacutil-exe-in-an-application-setup.aspx

笑忘罢 2024-07-16 18:47:47

好吧,对于将要坐在另一台机器前面的人来说,最简单的方法当然是安装程序。

我相信大多数 VS 版本都有某种安装程序支持,您可以在其中创建一个安装项目,最终形成 .exe 和 .msi 文件,您可以使用它来安装软件,然后您基本上会获得所需的所有内容,诸如桌面/开始菜单快捷方式、GAC 支持、卸载、下载 .NET 运行时(如果需要)等。

检查 Visual Studio 中的新项目对话框,我相信您会在那里找到有用的东西,如果没有的话我很确定这里有人可以为您指明正确的方向。

另一方面,如果您想采用手动方式,则一些 .NET 工具安装在 C:\Windows\Microsoft.NET\Framework\version 下的 .NET 目录中。

Well, the easiest way, for the person that's going to be sitting in front of that other machine that is, is of course an installation program.

I believe most VS editions have some sort of installer support where you can create a setup project that ends up as a .exe and .msi file that you can use to install your software with, and then you'll get basically all you need, things like desktop/start menu shortcuts, GAC-support, uninstall, downloading the .NET runtime if needed, etc.

Check the new project dialog box in your Visual Studio and I'm sure you'll find something useful there, if not then I'm pretty sure someone here can point you in the right direction.

On the other hand, if you want to go the manual route, then some of the .NET tools is installed in the .NET directory beneath C:\Windows\Microsoft.NET\Framework\version.

南…巷孤猫 2024-07-16 18:47:47

最可靠的方法是使用您的安装项目。 打开项目的文件系统视图,添加特殊文件夹“全局程序集缓存”,并将程序集添加到其中,然后构建安装项目就可以了。

如果你不使用安装项目,我真的不知道......

The most robust way would be to use your setup project. Open the File System view for the project, add the special folder "Global Assembly Cache", and add your assemblies to it, then build the setup project and you're good.

If you don't use a setup project, I don't really know...

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