Thanks! That worked. Comes up with warnings all through the compile though with:
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.CSharp.targets : warning MSB3052: The parameter to the compiler is invalid, '/define:VersionNumber=1.2.3.4' will be ignored. Also, in his post, I had to create the item for the LocalSolutionToBuild instead of LocationSolutionToPublish. Cheers Dave -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Sniderman Sent: Wednesday, 21 January 2009 11:55 AM To: [email protected]; [email protected] Subject: RE: Passing version number into WiX via TeamBuild 2008 [SEC=UNCLASSIFIED] I had a similar issue last February - and I posted ont he forum - and got a response here: this should be helpful http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/2a1f66bb-46f4-4618-8017-8607c366cc9b Daniel Sniderman Senior Consultant mobile: 847 668-4882 Magenic Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation ________________________________ From: [email protected] on behalf of Jansen, David Sent: Tue 1/20/2009 4:40 PM To: [email protected] Subject: Passing version number into WiX via TeamBuild 2008 [SEC=UNCLASSIFIED] All, I have been trying to implement a practical solution to pass through a version number into WiX projects via TeamBuild using wix pre-processor variables. Hopefully someone has figured this out already. I have attempted the following solutions 1. TeamBuild modifies WXS project (working - Thanks Grant!! - but not ideal as it always reformats the xml, and causes an item to merge when merging back up to main) 2. WiX extracts assembly version number during binding (working - not ideal for manual patch builds requiring new MSI version number) 3. Passing version number through to a wix pre-processor variable (not working) Solution 3 is the direction I would like to go and have had many attempts to get this working. Aaron Hallberg's blog post <http://blogs.msdn.com/aaronhallberg/archive/2008/05/12/orcas-sp1-tfs-build-changes-part-2.aspx> offers the solution when using VS2008/TeamBuild 2008 however I could not get this to work. i.e. the properties were not updated in the SolutionToBuild. In the Wix project file, I've defined the pre-processor variable VersionNumber=9.9.9.9 in order for it to compile for local Visual Studio 2008 builds. I'm was hoping to override this property when built by TeamBuild. In the TeamBuild script, I have created a pre-processor variable called VersionNumber in the WiX script and in order to pass a value to it from TeamBuild, I specify the following: <SolutionToBuild Include="SomeSolution.sln"> <Properties>DefineConstants=VersionNumber=$(VersionNumber)</Properties> </SolutionToBuild> Aaron Hallberg then mentions that in order to set the $(VersionNumber), you have to set the following: <Target Name="BuildNumberOverrideTarget"> <PropertyGroup> <CustomPropertiesForBuild>$(CustomPropertiesForBuild);VersionNumber=$(VersionNumber)</CustomPropertiesForBuild> </PropertyGroup> </Target> However this still does not work for me. DefineConstants has a VersionNumber='emptystring'. If I hard code DefineConstants=VersionNumber=1.2.3.4 it works perfectly. So for some simply reason, I cannot get TeamBuild to re-set the VersionNumber property when used in the SolutionToBuild item list. Any thoughts, ideas, suggestions would be greatly appreciated. Surely there is someone out there trying to do the same simple thing. Cheers Dave ********************************************************************** WARNING This email message and any attached files may contain information that is confidential and subject of legal privilege intended only for use by the individual or entity to whom they are addressed. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient be advised that you have received this message in error and that any use, copying, circulation, forwarding, printing or publication of this message or attached files is strictly forbidden, as is the disclosure of the information contained therein. If you have received this message in error, please notify the sender immediately and delete it from your inbox. AFP Web site: http://www.afp.gov.au ********************************************************************** ________________________________ Support procedure: https://www.codify.com/lists/support List address: [email protected] <mailto:[email protected]> Subscribe: [email protected] <mailto:[email protected]> Unsubscribe: [email protected] <mailto:[email protected]> List FAQ: http://www.codify.com/lists/oztfs <http://www.codify.com/lists/oztfs> Other lists you might want to join: http://www.codify.com/lists <http://www.codify.com/lists> -------------------------------------------------------------------------------- Support procedure: https://www.codify.com/lists/support List address: [email protected] Subscribe: [email protected] Unsubscribe: [email protected] List FAQ: http://www.codify.com/lists/oztfs Other lists you might want to join: http://www.codify.com/lists ********************************************************************** WARNING This email message and any attached files may contain information that is confidential and subject of legal privilege intended only for use by the individual or entity to whom they are addressed. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient be advised that you have received this message in error and that any use, copying, circulation, forwarding, printing or publication of this message or attached files is strictly forbidden, as is the disclosure of the information contained therein. If you have received this message in error, please notify the sender immediately and delete it from your inbox. AFP Web site: http://www.afp.gov.au ********************************************************************** -------------------------------------------------------------------------------- Support procedure: https://www.codify.com/lists/support List address: [email protected] Subscribe: [email protected] Unsubscribe: [email protected] List FAQ: http://www.codify.com/lists/oztfs Other lists you might want to join: http://www.codify.com/lists
