tags:

views:

38

answers:

1

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

A: 

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.

heavyd
I've built installer and custom action on both on 32 and 64 bit machine. For 32bit machine I've checked it to use correct sfxca.dll and built it for x86, also installer was built using x86. But anyway I have BadImageFormat expcetion
Regfor