[wix-users] User Defined variable used in BeforeBuild

Brian Enderle brianke at gmail.com
Thu Nov 5 10:02:48 PST 2015


I would like to use a variable I am defining in my Product.wxs:

<?define ProductTitle = "My Product Title"?>

in a BeforeBuild action:

<!-- Update Assembly.cs for this product -->
    <AssemblyInfo AssemblyProduct=$(var.ProductTitle) />

Obviously this doesn't work.


Is there a way I can use a User Defined Variable from my Product.wxs file
in the BeforeBuild?

The reason for this is we develop numerous products using the same base C#
project.  I create different WiX installers which contain different SQL
files used by the different products.  When I build the WiX product I would
like to update the base product so the version number matches the product.

I have seen many examples of updating the WiX version number using the C#
project info but this is exactly opposite of that and I have not found any
info on doing this.



Brian

If you can't explain it simply, you don't understand it well enough.  -
Albert Einstein


More information about the wix-users mailing list