Bah, turns out I needed to explicitly point to the msbuild in: C:\Windows\Microsoft.NET\Framework\v4.0.30319\
No other instance of MSBUILD.EXE works with this particular assembly. Why would the other WiX assemblies work out ok? Perhaps some bad .config value or compiler options for heat.exe? Stephen Tunney Nuance Communications, Inc. Solutions Architect, Imaging Division Waterloo, Ontario, Canada stephen.tun...@nuance.com 519-880-7463 Office NUANCE.COM The experience speaks for itself (tm) -----Original Message----- From: Tunney, Stephen [mailto:stephen.tun...@nuance.com] Sent: May-16-14 2:37 PM To: General discussion about the WiX toolset. Subject: [WiX-users] HeatDirectory MSBuild task dying with BadImageFormatException Hey everyone, Ok, I've added a BeforeBuild target in my wixproj to run heat on a directory using the HeatDirectory task. I see in my logs that msbuild is successfully calling lit, candle, etc. successfully but I get the following error from heat :( Thoughts? I get this whether I run msbuild from 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319' or 'C:\Windows\Microsoft.NET\Framework\v2.0.50727' Please help :( I'm running 3.7 RTM [msbuild2] C:\Program Files (x86)\WiX Toolset v3.7\bin\Heat.exe dir ../../../Libraries/DWS/JDK/server-jre-windows-x86/jre1.7.0_21 -cg DWS_JDK_ComponentGroup_x86 -dr DWS -scom -sreg -var var.WASLibraries_JDK -nologo -v -ag -gg -nologo -t JDK.HeatTx.xsl -out ./Generated/JDK.x86.wxs [msbuild2] Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.7\bin\Heat.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format. [msbuild2] at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) [msbuild2] at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) [msbuild2] at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) [msbuild2] at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) [msbuild2] at System.Reflection.Assembly.LoadFrom(String assemblyFile) [msbuild2] at Microsoft.Tools.WindowsInstallerXml.Build.Tasks.WixToolTask.ExecuteToolThread(Object parameters) [msbuild2] Stephen Tunney Nuance Communications, Inc. Solutions Architect, Imaging Division Waterloo, Ontario, Canada stephen.tun...@nuance.com<mailto:stephen.tun...@nuance.com> 519-880-7463 Office NUANCE.COM The experience speaks for itself (tm) ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users