wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 36 forks source link

VS2022 64-bit build fails #6927

Closed MikeAtETI closed 2 years ago

MikeAtETI commented 2 years ago

Please provide answers to the following questions to help us narrow down, reproduce, and fix the problem. Fill out one section and delete the others.

Bugs

If this issue is a bug:

Project build triggered by right clicking on project in Visual Studio and choosing "Build"

Output window contains

 Raytemp Blue Test Jig -> C:\Users\mike.hudgell\Source\Repos\ETI.BlueThermLE.ProductionSoftware\Raytem Blue Test Jig\bin\Release\Raytemp Blue Test Jig.exe 
Build started: Project: Bluetooth LE Production Installer, Configuration: Release x86   
C:\Program Files (x86)\WiX Toolset v3.14\bin\Heat.exe dir "..\Raytem Blue Test Jig\bin\Release" -cg RaytempFilesComponentGroup -dr dir_raytemp -sreg -srd -var var.Ras 6> Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.11\bin\Heat.exe or one of its dependencies. An attempt was made to load a program with 6> at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackh 
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reciAssembly, StackCrawlMark
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte() hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolez 6> at System.Reflection.Assembly.LoadFrom(String assemblyFile) 
at Microsoft.Tools.WindowsInstallerXml.Build.Tasks.WixToolTask.ExecuteToolThread(Object parameters) 

At this point VS2022 crashes, so had to OCR a screenshot above

? is it possible to force vs to use 32-bit build for this project ?

Project builds and produces MSI

MikeAtETI commented 2 years ago

command line msbuild seems to suffer the same (and the msbuild.exe process also crashes) [this time I've added 3.14 to see if that helped]

Project "C:\Users\mike.hudgell\Source\Repos\ETI.BlueThermLE.ProductionSoftware\Bluetooth LE Instrument Production Softw
are.sln" (1) is building "C:\Users\mike.hudgell\Source\Repos\ETI.BlueThermLE.ProductionSoftware\Bluetooth LE Production
 Installer\Bluetooth LE Production Installer.wixproj" (11) on node 1 (default targets).
BeforeBuild:
  C:\Program Files (x86)\WiX Toolset v3.14\bin\Heat.exe dir "..\Raytem Blue Test Jig\bin\Release" -cg RaytempFilesCompo
  nentGroup -dr dir_raytemp -sreg -srd -var var.RayTemp.TargetDir -nologo -ag -nologo -out "C:\Users\mike.hudgell\Sourc
  e\Repos\ETI.BlueThermLE.ProductionSoftware\Bluetooth LE Production Installer\\Projects\RayTempInstallFiles.wxs"
  Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.14\bin\Heat.exe' or one of its depende
  ncies. An attempt was made to load a program with an incorrect format.
     at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Run
  timeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean fo
  rIntrospection, Boolean suppressSecurityChecks)
     at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity,
   RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean
   forIntrospection, Boolean suppressSecurityChecks)
     at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashV
  alue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark&
  stackMark)
     at System.Reflection.Assembly.LoadFrom(String assemblyFile)
     at Microsoft.Tools.WindowsInstallerXml.Build.Tasks.WixToolTask.ExecuteToolThread(Object parameters)
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files (x86)\WiX Toolset v3.14\bin\Heat.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Microsoft.Tools.WindowsInstallerXml.Build.Tasks.WixToolTask.ExecuteToolThread(Object parameters)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)
MikeAtETI commented 2 years ago

compiling the same wixproj in vs2019 works ok, so it does look like a bitness issue.

robmen commented 2 years ago

Duplicate of #6636