Wix 3.5 和 .net 4 自定义操作不起作用

发布于 2024-09-29 15:08:13 字数 576 浏览 1 评论 0原文

我的自定义操作程序集不适用于 wix 3.5。当我在 .net 3.5 下的属性中构建自定义操作时,一切正常,但是当将自定义操作程序集目标框架的项目属性更改为 .net 4 时,它会失败并出现 BadImageFormatException。实用程序 makefxca.exe 可以与 .net 3.5 和 4.0 ca 程序集配合良好。

ca 程序集和 wix 实用程序的配置文件如下:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
    <supportedRuntime version="v2.0.50727" />    
  </startup>
</configuration>

自定义操作不执行任何具体操作 - 简单地显示消息框。使用带有 wix 3.5 的 Visual Studio 2010

My custom action assembly doesn't work with wix 3.5. When I build custom action under .net 3.5 in propreties all works fine, but when change in project properties of custom actions assembly target framework to .net 4 - it fails with BadImageFormatException. Utility makesfxca.exe works fine with both - .net 3.5 and 4.0 ca assemblies.

Config files for ca assembly and for utilities from wix are following:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
    <supportedRuntime version="v2.0.50727" />    
  </startup>
</configuration>

Custom action does nothing specific - simple shows message box. Visual Studio 2010 with wix 3.5 used

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

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

发布评论

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

评论(1

九命猫 2024-10-06 15:08:13

根据我的经验,BadImageFormat 异常通常表示 32/64 位问题。您在 64 位机器上运行吗?如果是这样,请确保您的项目设置为构建正确的位数。

In my experience, the BadImageFormat exception typically points to a 32/64 bit issue. Are you running on a 64 bit machine? If so, make sure your project is setup to build for the correct bitness.

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