Wix 3.5 和 .net 4 自定义操作不起作用
我的自定义操作程序集不适用于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我的经验,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.