To be a little more specific, the _SetDefaultPathValues target is likely
what's causing you grief. It looks at registry keys to try and detect if the
32-bit version of Wix is installed. If so, it sets the WixToolPath property
accordingly. It then checks if the WixToolPath was set, and if not (i.e. no
32-bit install was found, therefore we must be 64-bit), it sets
RunWixToolsOutOfProc to true.

Two things can cause problems with this:

1) Having registry keys from the 32-bit version of Wix on your machine.
2) Manually overriding the WixToolPath property in your build process.

Either one of these will trick the targets into thinking they should be
running in 32-bit mode. If you're manually setting the WixToolPath property,
just set RunWixToolsOutOfProc to true in the same place.

On Mon, Apr 19, 2010 at 6:31 PM, Gary Schorer <thanatoas...@gmail.com>wrote:

> In my case, I just stopped running the Wix tools in process.
> <RunWixToolsOutOfProc>true</RunWixToolsOutOfProc>
>
>
> On Mon, Apr 19, 2010 at 6:21 PM, Navid Azimi-Garakani <
> naz...@microsoft.com> wrote:
>
>> I am using WiX 3.5.1602.0. If you look at the executables with corflags,
>> you'll see that they are compiled for the 32-bit architecture.
>>
>> d:\wix\3.5.1602.0>corflags candle.exe
>> Version   : v2.0.50727
>> CLR Header: 2.5
>> PE        : PE32
>> CorFlags  : 11
>> ILONLY    : 1
>> 32BIT     : 1 <-- 32-bit flag
>> Signed    : 1
>>
>> d:\wix\3.5.1602.0>corflags light.exe
>> Version   : v2.0.50727
>> CLR Header: 2.5
>> PE        : PE32
>> CorFlags  : 11
>> ILONLY    : 1
>> 32BIT     : 1 <--- 32-bit flag
>> Signed    : 1
>>
>> As a result, when loaded from a 64-bit MSBuild process, I am getting the
>> following exception:
>>
>> 100>Unhandled Exception: System.BadImageFormatException: Could not load
>> file or assembly 'file:///d:\wix\3.5.1602.0\candle.exe' or one of its
>> dependencies. An attempt was made to load a program with an incorrect
>> format.
>> 100>File name: 'file:///d:\wix\3.5.1602.0\candle.exe'
>> 100> at System.Reflection.Assembly._nLoad(AssemblyName fileName, String
>> codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
>> stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
>> 100> at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
>> Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
>> forIntrospection)
>> 100> at System.Reflection.Assembly.LoadFrom(String assemblyFile)
>> 100> at
>> Microsoft.Tools.WindowsInstallerXml.Build.Tasks.WixToolTask.ExecuteToolThread(Object
>> parameters)
>> 100> at System.Threading.ExecutionContext.Run(ExecutionContext
>> executionContext, ContextCallback callback, Object state)
>> 100> at System.Threading.ThreadHelper.ThreadStart(Object obj)
>> 100>Assembly manager loaded from:
>>  C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
>> 100>Running under executable  d:\tools\AMD64\managed\urt\v3.5\MSBuild.exe
>> 100>--- A detailed error log follows.
>> 100>=== Pre-bind state information ===
>> 100>LOG: User = ###############
>> 100>LOG: Where-ref bind. Location = d:\wix\3.5.1602.0\candle.exe
>> 100>LOG: Appbase = file:///d:/tools/AMD64/managed/urt/v3.5/
>> 100>LOG: Initial PrivatePath = NULL
>> 100>Calling assembly : (Unknown).
>> 100>===
>> 100>LOG: This bind starts in LoadFrom load context.
>> 100>WRN: Native image will not be probed in LoadFrom context. Native image
>> will only be probed in default load context, like with Assembly.Load().
>> 100>LOG: Using application configuration file:
>> d:\tools\AMD64\managed\urt\v3.5\MSBuild.exe.Config
>> 100>LOG: Using machine configuration file from
>> C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
>> 100>LOG: Attempting download of new URL
>> file:///d:/wix/3.5.1602.0/candle.exe.
>> 100>ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing
>> terminated.
>>
>> Do we have a 64-bit compatible version of these executables? I looked at
>> the assemblies installed when running Wix64.msi but there appears to be no
>> difference to the assemblies themselves. What am I misunderstanding about
>> WiX supporting 64-bit MSBuild?
>>
>> Thanks,
>> Navid
>>
>> -----Original Message-----
>> From: Bob Arnson [mailto:b...@joyofsetup.com]
>> Sent: Monday, April 12, 2010 7:14 PM
>> To: wix-users@lists.sourceforge.net
>> Subject: Re: [WiX-users] 64-bit WiX
>>
>> On 4/12/2010 9:33 PM, Navid Azimi-Garakani wrote:
>> > I realize that this has been a long standing issue<
>> http://sourceforge.net/mailarchive/message.php?msg_name=9EE4B5B02235CB43ACFE2376CC2F11F0D03891%40ntxbeus04.exchange.xchg>
>>  but I am working on getting the WiX toolset to compile and run as 64-bit
>> processes. This is necessary because we're running into a
>> BadImageFormatException when trying to invoke WiX via a 64-bit MSBuild
>> process.
>> How are you doing that? The shipping wix.targets already supports 64-bit
>> MSBuild.
>>
>> --
>> sig://boB
>> http://joyofsetup.com/
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to