tags:

views:

143

answers:

1

I'm trying to set the preprocessor variable in wix and i'm unable to find an example of this or explanation on how to do it anywhere on the internet, i'm hoping somebody here can explain or show me where im going wrong!

I have tried the example shown here regarding setting var values http://www.ageektrapped.com/blog/setting-properties-for-wix-in-msbuild/

The documentation for using the HeatDirectory taks in wix can be found here and is not very useful at all!

How do i set the preprocessorVariable to substitute the SourceDir for another variable name?

A: 

I found out what it was, after 1 day of trying various things, the link above is correct but to use the var in the heatdirectory task you have to do it like this.

<HarvestDirectory Include="$(ProjectDirectory)\" >
      <DirectoryRefId>WEBDIR</DirectoryRefId>
      <KeepEmptyDirectories>true</KeepEmptyDirectories>
      <SuppressRegistry>true</SuppressRegistry>
      <ComponentGroupName>DynamicWebFiles</ComponentGroupName>
      <PreprocessorVariable>var.WixDynamicSourceDirectory</PreprocessorVariable>
   </HarvestDirectory>
Stuart