[wix-users] Harvest mba project as payload?

Phill Hogland phill.hogland at rimage.com
Fri Feb 19 08:49:04 PST 2016


Is there a way to use heat to harvest the Output of my mba project, and create a fragment(s) as Payload elements for use in the bundle?

I currently manually author a wxs file with a PayloadGroup  (which includes both PayloadGroupRef defined in another wxs, and Payload elements as below:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     >
  <Fragment>
    <PayloadGroup Id='mba_payloads'>
      <PayloadGroupRef Id="BACommonData" />
      <Payload SourceFile='!(bindpath.mba)\mba.dll' />
      <Payload Name='BootstrapperCore.config' SourceFile='!(bindpath.mbaUXProj)\mba.BootstrapperCore.config' />

       <!-some dependencies-->
      <Payload Name='WPFLocalization.dll' SourceFile='!(bindpath.mba)\dependency.dll' />
       <!-- satellites -->
      <Payload Name='de\mba.resources.dll' SourceFile='!(bindpath.mba)\de\mba.resources.dll' />
    </PayloadGroup>
  </Fragment>
</Wix>

Where BAComoneData is a fragment which defines Variable and CustomTable elements used by my BA.

I use a bindpath name because this wxs is compiled into my bundle_library project and used in many different bundle projects, where the bindpath is then resolved.  I tried to use HarvestProject but the output is not suited for being a Payload.  I see that the 'payload' heat type is not documented in Heat "Usage Information" of the chm

I just thought I would ask if there is a simpler approach before I try to write a transform to produce the desired output.  Or should I take a different approach?  Currently when I author the payload above I have to edit it when I add references to my mba project.  What is the best way to automate this process?
Thanks for any suggestions. Phill

PS: A couple of side issues that I noticed are:

1)      HarvestProject does not use the OutputPath MSBuild property defined in the .csproj file rather it builds a path based on the Configuration, so if the project has the following defined for a Release configuration it fails to find the files.
<OutputPath>bin\Output\</OutputPath>

2)       HarvestProject, unlike HarvestDirectory did not treat PreprocessorVariable defined as var.name and replace it as !(wix.name), but it did insert $(var.name), and I modified my bindpath transform to adjust of rthis behavior.

3)      I did not figure out how to get dependent assemblies to associate with the Binaries OutputGroup (or get Heat to use the MSBuild OutputGroupDependencis) and be harvested (or maybe I should not even do this?)




More information about the wix-users mailing list