My product wxs starts as this: 

<?xml version="1.0" encoding="UTF-8"?> 
<?define VERSION="0.3.0"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";> 
  <Product Id="*" 
           Name="!(wix.ProductName) !(wix.TheVersion)" 
           Language="1033" 
           Version="!(wix.TheVersion)" 
           Manufacturer="My Company" 
           UpgradeCode="!(wix.UpgradeID)"> 
     
    <Package InstallerVersion="200" 
             Compressed="yes" 
             Description="!(wix.ProductName) !(wix. TheVersion) Setup" /> 

    <WixVariable Id="ProductName" Value="My Product Name" /> 
    <WixVariable Id="UpgradeID" Value="{5FC4DAE6-D1B9-42D6-BF3A-6DA600FB8A3F}" 
/> 
    <WixVariable Id="TheVersion" Value="0.3.0"/> 

This fails to compile with the following errors: 

Error   1       The Product/@Version attribute's value, '!(wix.TheVersion)', is 
not a valid version.  Legal version values should look like 'x.x.x.x' where x 
is an integer from 0 to 65534.    
C:\russell\ServerTools\trunk\IssueChooserWix\Product.wxs        4       1       
IssueChooserWix 
Error   2       The Product/@Version attribute was not found; it is required.   
C:\russell\ServerTools\trunk\IssueChooserWix\Product.wxs        4 1     
IssueChooserWix 

If I change the product version from using the WixVariable to the defined 
VERSION e.g. 

  <Product Id="*" 
           Name="!(wix.ProductName) !(wix.TheVersion)" 
           Language="1033" 
           Version="$(var.VERSION))" 
           Manufacturer="My Company" 
           UpgradeCode="!(wix.UpgradeID)"> 

Then this works as expected.  But using the WixVariable works in the Product 
Name string, but not as the product value.  Even if I declare the variable as 

<WixVariable Id="TheVersion" Value="$(var.VERSION)" /> 

It still fails as the product version.  Is this a bug in the compiler? 

I'd like to define this variable in a common library shared by all my setup 
projects in a single solution but this is preventing that. 

Cheers 

Russell

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to