WixLightArguments and preprocesser

Topics: General Questions, Server Deployment, Tips and Tricks
Feb 16, 2015 at 7:06 PM
Edited Feb 16, 2015 at 7:10 PM
I'm trying to override the default arguments provided to LIGHT, by providing the <WixLightArgument> element in the BTDFPROJ file. And I'm wondering how I prevent the processor from expanding things like $(IntermediateOutputPath)\GenericBizTalkMSI.wixobj.

I've tried a CDATA section, I've escaped things like " with ", all without success.

When I don't override the light arguments, the above is expanded correct to include the full path to the wixobj file.
When I DO override the light arguments, the above is expanded incorrectly to only "\GenericBizTalkMSI.wixobj". So my guess is that the preprocessing is replacing the values.
Feb 18, 2015 at 4:27 AM
The properties within the default WixLightArguments are undefined at the time that MSBuild evaluates your override of the property. Try this instead -- you may already have a CustomRedist target. I'm going to assume that you're on v5.5 and at least BizTalk 2010.
<Target Name="CustomRedist">
    <WixLightArguments>&quot;$(IntermediateOutputPath)\GenericBizTalkMSI.wixobj&quot; &quot;$(IntermediateOutputPath)\RedistComponentGroup.wixobj&quot; -out &quot;$(TargetDir)\$(MsiName).msi&quot; -ext &quot;$(WixDir)\WixUIExtension.dll&quot; -ext &quot;$(WixDir)\WixNetFxExtension.dll&quot; -spdb $(MSIValidationParam)</WixLightArguments>
In this example, the value shown is just the default value in v5.5.

Marked as answer by deankasa on 2/17/2015 at 9:46 PM
Feb 18, 2015 at 4:47 AM
That indeed did solve the problem. Thank you.