We do something similar in that we have a build number that is used in the MSI 
product version.

The build number is defined in the MSBuild project and passed into the Wix 
project. Its not possible to pass data in the other direction, from Wix to 
MSBuild, as far as I know.
In the Wix project properties, in the build section, we have a line that looks 
like this to pass MSBuild properties into wix pre-processor variables:

Define Preprocessor Variables: 
buildNumber=$(SdlBuildNumber);buildOutputDir=$(MSBuildProjectDirectory)\..\..\..\..\..\Bin\Mixed
 
Platforms\$(Configuration);sourceRoot=$(MSBuildProjectDirectory)\..\..\..\..\.. 

To enable the project to compile in the IDE, without MSBuild, we add lines like 
these to the Wix source code:

<?ifndef buildNumber ?>
<?define buildNumber = 0 ?>
<?endif?>

<?if $(var.buildNumber) = "" ?>
<?define buildNumber = 0 ?>
<?endif?>

<?ifndef sourceRoot ?>
<?error sourceRoot is not defined. ?>
<?endif?>


..


-----Original Message-----
From: Jonathan Ebersole [mailto:j...@compdevsys.com] 
Sent: 20 September 2010 18:09
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Creating a Custom Output Path

Thanks for your reply. Where/how would I set these MSBuild properties in the 
WiX project?  I also have a line item in my WiX .wxs file that lists the 
product information.  One of the properties is 
Version="1.2.0.0"

I haven't found a way for me to use the product version from my project 
properties screen to apply to this line entry either.  So now I would have to 
change the version info in at least two places for it to take effect.  I'm 
trying to get it to play nicely between WiX and MSBuild and only set the 
version in one place.  My fear is that I will forget to set it and the version 
numbers won't match on a build.

Best Regards,
Jonathan Ebersole
Microsoft Certified Solution Developer
Computer Development Systems, LLC
Phone: 1 (717) 591-0995  x102
http://www.CompDevSys.com



-----Original Message-----
From: Peter Shirtcliffe [mailto:pshirtcli...@sdl.com] 
Sent: Monday, September 20, 2010 9:43 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Creating a Custom Output Path

The output path is an MSBuild concept. The pre-processor and "other"
variables are Wix concepts. You need to define your output path in terms
of MSBuild properties.



-----Original Message-----
From: Jonathan Ebersole [mailto:j...@compdevsys.com] 
Sent: 20 September 2010 14:26
To: 'wix-users@lists.sourceforge.net'
Subject: [WiX-users] Creating a Custom Output Path

I am currently using WiX 3.5 in VS2010 and I am trying to make a custom
output path.  I'm doing this so that when I change my product version
from 1.2.0.0 to 1.3.0.0 it will create a folder under
obj\release\1.3.0.0\ for the installation files.  This way, I can
compile and keep different versions of the software for testing.  I want
it to go to \obj\$(Configuration)\$(ProductVersion), but it never sees
my product version.  It creates a folder with the name of "0.0.0.0".

In the 'Define preprocessor variables:' section in the project
properties I have
ProductVersion=$(Version)

In the 'Define variables:' section in the project properties I have
ProductVersion=1.2.0.0

Any ideas? Thanks.

Best Regards,
Jonathan Ebersole
Microsoft Certified Solution Developer
Computer Development Systems, LLC
Phone: 1 (717) 591-0995  x102
http://www.CompDevSys.com<../../../../../exchweb/bin/redir.asp?URL=http:
//www.compdevsys.com/>




------------------------------------------------------------------------
------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
</pre>
<BR style="font-size:4px;">
<a href = "http://www.sdl.com";><img src="http://www.sdl.com/images/email 
logo_150dpi-01.png" alt="www.sdl.com" border="0"/></a>
<BR>
<font face="arial"  size="2"><a href = "http://www.sdl.com"; 
style="color:005740; font-weight: bold">www.sdl.com</a></font>
<BR>
<BR>
<font face="arial"  size="1" color="#736F6E">
<b>SDL PLC confidential, all rights reserved.</b>
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.<BR>
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.<BR>
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.
</font>



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to