1
votes

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

1

1 Answers

0
votes

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.