使用 WiX 将程序集放入 GAC 和安装路径中
我刚刚开始学习如何使用 WiX,但遇到了障碍。我的软件包使用第三方库,该库要求 GAC 和软件包安装目录中都存在一些文件。
使用 WiX,我可以使文件显示在安装目录或 GAC 中,但不能同时显示在两者中。
有什么办法可以解决这个问题吗?
I'm just starting to learn how to use WiX and I'm running into a snag. My package uses a third party library that requires some file to exist both in the GAC and the package installation directory.
Using WiX, I can make files show up in the installation directory, or in the GAC, but not both.
Is there any way to work around this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这里有一篇关于 安装程序集GAC 和本地文件系统。其中包含一些实际的 WiX 代码,可以满足您的需求。
There's a post here about installing an assembly to both the GAC and local file system. This has some actual WiX code in it that does what you're looking for.
我找到了该帖子 - 此后已移动,新 URL 位于:https://devblogs.microsoft.com/setup/installing-assemblies-for-runtime-and-design-time-use/
本质上,您创建 2 个组件,GAC 一个进入一个基本上被忽略的新文件夹,因为它将转到 GAC,另一个组件将转到您要复制到的位置 - 只是没有
Assembly=".net"
属性。下面的示例来自代码,我已经使用这种技术在我的项目中运行了它。
I found the post - which has since moved, the new URL is here: https://devblogs.microsoft.com/setup/installing-assemblies-for-runtime-and-design-time-use/
In essence, you create 2 components, the GAC one into a new folder which is basically ignored, as it will go to the GAC, and another component to the place you want to copy to - just without the
Assembly=".net"
property.The below example is from the code, and I've got it working in my project using this technique.