WiX Custom Action Error - An attempt was made to load a program with an incorrect format #7942
-
I've rewritten some custom actions with WiX v4.0.3 and I've run up against an issue. The install fails with.... Action start 9:37:25: MyCustomAction. WRN: Assembly binding logging is turned OFF. CustomAction MyCustomAction returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) I'm not sure what I might be missing. Any help appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I figured out my problem. I have Post-Build steps set up to recreate the *.CA.dll because a typical compile through Visual Studio would not have the encapsulated .dll digitally signed. So when I recreate the .CA.dll... "%25HOMEPATH%25.nuget\packages\WixToolset.Dtf.CustomAction\4.0.3\tools\WixToolset.Dtf.MakeSfxCA.exe" "$(TargetDir)$(TargetName).CA.dll" "%25HOMEPATH%25.nuget\Packages\WixToolset.Dtf.CustomAction\4.0.3\tools**x64**\SfxCA.dll" "$(TargetPath)" "$(TargetDir)CustomAction.config" "$(TargetDir)WixToolset.Dtf.WindowsInstaller.dll" ,... I was pointing to the x86 SfxCA.dll for my 64 bit actions. That caused the issue. |
Beta Was this translation helpful? Give feedback.
I figured out my problem. I have Post-Build steps set up to recreate the *.CA.dll because a typical compile through Visual Studio would not have the encapsulated .dll digitally signed. So when I recreate the .CA.dll...
"%25HOMEPATH%25.nuget\packages\WixToolset.Dtf.CustomAction\4.0.3\tools\WixToolset.Dtf.MakeSfxCA.exe" "$(TargetDir)$(TargetName).CA.dll" "%25HOMEPATH%25.nuget\Packages\WixToolset.Dtf.CustomAction\4.0.3\tools**x64**\SfxCA.dll" "$(TargetPath)" "$(TargetDir)CustomAction.config" "$(TargetDir)WixToolset.Dtf.WindowsInstaller.dll"
,... I was pointing to the x86 SfxCA.dll for my 64 bit actions. That caused the issue.