Dennis
Dennis

Reputation: 37780

WiX setup: adding a reference to Visual Studio project output issue

I'm trying to learn WiX and now creating sample setup project, using WiX Setup Project template for Visual Studio.

I have a solution with three projects:

Of course, I want to add my first two projects' output as components to WiX setup.

As described here and here (and as far, as I understand), adding a reference in WiX project and setting it Harvest property to True automatically adds a component for project's output.

Now, I want to reference to this component in some Feature description.

The questions:

I'm using VS 2010 and WiX 3.6 RC.

Upvotes: 14

Views: 15928

Answers (2)

caveman_dick
caveman_dick

Reputation: 6647

Currently Harvesting referenced project outputs does not work in Wix3.6 and will be added in Wix4.0

For now you will have to manually add the binary outputs into your project yourself (which I personally prefer anyway). For the examples below the Components will be named the same as their Child File elements (dotNetClass.Output and dotNetApp.Output).

<Component>
    <File Id="dotNetClass.Output"
          Name="$(var.dotNetClass.TargetFileName)"
          Source="$(var.dotNetClass.TargetPath)"
          KeyPath="yes" />
</Component>

<Component>
    <File Id="dotNetApp.Output"
          Name="$(var.dotNetApp.TargetFileName)"
          Source="$(var.dotNetApp.TargetPath)"
          KeyPath="yes" />
</Component>

Upvotes: 14

Farrukh Waheed
Farrukh Waheed

Reputation: 2193

As an alternative, you can use HarvestProject, HeatDirectory and HarvestDirectory MsBuild tasks:

These are needed to embedded into your *.wixproj file or you can create a separate MSBuild compatible proj file.

Upvotes: 2

Related Questions