通过 WiX 3 检测程序集是否位于 GAC 中?

发布于 2024-07-16 17:56:31 字数 149 浏览 3 评论 0原文

我想在 WiX 3 中检测(最好通过条件)特定程序集是否在 GAC 中。 我知道该程序集的名称、版本和公钥令牌。 有没有内置的方法可以做到这一点,或者我必须编写一个 CustomAction 来做到这一点? 我该如何设置 CustomAction? (这将是在安装开始之前。)

I'd like to detect in WiX 3 (preferably via a Condition) whether a particular assembly is in the GAC. I know the name, version, and public key token of said assembly. Is there any built in way to do this, or will I have to write a CustomAction to do it? And how would I go about setting up that CustomAction? (This would be before the install begins.)

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

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

发布评论

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

评论(2

[旋木] 2024-07-23 17:56:32

您可以使用 FileSearch 来搜索 %windir%\ assembly\ 中的文件GAC(如果您知道所有其他值)有点老套但有效。
完整的文件路径将存储在一个属性中,您可以在安装开始之前使用该属性。

You can use FileSearch to search for the file in %windir%\assembly\GAC (If you know all the other values) a bit hacky but works.
The full file path will be stored inside a property which you can use in condition before the install start.

咆哮 2024-07-23 17:56:32

需要小心。 程序集不仅可以安装在 %windir%\Assembly\GAC 文件夹中。 我的程序集通常安装在%windir%\ assembly \ GAC_MSIL中。 只需搜索%windir%\ assembly \就可以了。

Need to be careful. Assemblies can be installed in more than just the %windir%\assembly\GAC folder. My assemblies are most often installed in the %windir%\assembly\GAC_MSIL. Just search the %windir%\assembly\ and you should be ok.

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