WIX:当目标DLL是用.net 4编写时,如何使用ComPlus操作?

发布于 2024-09-30 10:12:27 字数 246 浏览 0 评论 0原文

我正在尝试将组件从 .net 3 转换为 4。该组件具有必须安装到组件服务应用程序中的 com interp 函数。目前,我正在使用 WiX 构建的安装来通过 Complus 操作完成工作。但是,当组件更改为 .net 4 时,如果只是遇到无效引用问题,因为它似乎使用了错误版本的企业服务。环顾网络,似乎对于您自己的自定义操作,您需要将supportedRuntime添加到操作配置中并将配置和dll链接在一起。但是,我不知道如何对 WiX 附带的操作执行此操作。有什么想法吗?

I'm trying to convert a component from .net 3 to 4. The component has com interp functions that must be installed into a Component Services application. Current I'm using a WiX constructed install to do the work via the Complus action. However, when the component is changed to .net 4 if just get invalid reference problems as it seems to use the wrong version of Enterprise Services. Looking around the web it seems that for your own custom actions you'd add a supportedRuntime to the actions config and link the config and dll together. However, I've no idea how to do this for an action that comes with WiX. Any ideas?

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

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

发布评论

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

评论(1

南笙 2024-10-07 10:12:27

实际上,我想得越多,我就越相信 Complus 操作是一个由非托管代码调用的非托管组件。因此没有机会使用配置 SxS 的想法。因此,查看 Complus 操作的代码,它正在执行一个相当简单的 CoCreateInstance 来创建 System.EnterpriseServices 组件的实例。所以问题是 CoCreateInstance 总是创建 .net 2 版本的组件,如何让 CoCreateInstance 调用 v4 版本?到目前为止,我所看到的唯一一件事就是更改 System.EnterpriseServices 的注册表并告诉它始终使用 4,但这听起来有点激进。海尔普....

Actually the more I think about it, I believe the Complus action is a non-managed component that is invoked by non-managed code. Therefore there isn't an opportunity to use the config SxS idea. So looking at the code for the Complus action it's doing a fairly simple CoCreateInstance to create an instance of System.EnterpriseServices component. So the problem is that CoCreateInstance always creates a .net 2 version of the component, how do you get CoCreateInstance to invoke the v4? So far the only thing I've seen is to alter the registry for System.EnterpriseServices and tell it to always use 4 but that sounds a bit drastic. Heellllp....

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