By default, OutputPath is set to "bin\$(Configuration)\".  VS should pick it up 
from there.

From: [email protected] [mailto:[email protected]] On Behalf Of Jansen, David
Sent: Tuesday, January 20, 2009 4:57 PM
To: [email protected]
Subject: RE: Passing version number into WiX via TeamBuild 2008 
[SEC=UNCLASSIFIED]

Thanks! Yes that is the problem I'm having, however, Aaron's blog post 
suggested he had a solution for that. Very confusing.

Ok, so using your approach, how are you specifying file path locations in your 
wix script when building from Visual Studio? I noticed that you set 
OutputPath=BinariesRoot which allows the Wix script to get all the files from 
binaries root.

Note: I didn't need to pass through the Configuration property. It is available 
in the new wix build.

Cheers
Dave

From: [email protected] [mailto:[email protected]] On Behalf Of John Burns
Sent: Wednesday, 21 January 2009 9:53 AM
To: [email protected]
Subject: RE: Passing version number into WiX via TeamBuild 2008 
[SEC=UNCLASSIFIED]

I should note that the reason it doesn't work in the SolutionToBuild definition 
is because those properties and items are all defined when the build is 
initialized.

From: [email protected] [mailto:[email protected]] On Behalf Of John Burns
Sent: Tuesday, January 20, 2009 4:50 PM
To: [email protected]
Subject: RE: Passing version number into WiX via TeamBuild 2008 
[SEC=UNCLASSIFIED]

I added <DefineSolutionProperties>false</DefineSolutionProperties> to my WiX 
project files and then the following preprocessor variables on the Property 
pages.

SimpleVersion=1.0;DetailedVersion=1.0.0.0

Then I used the Attrib and FileUpdate tasks from MSBuild.Community.Tasks as 
follows in the AfterGet target.

    <CreateItem Include="$(SolutionRoot)\**\*.wixproj">
      <Output TaskParameter="Include" ItemName="WixProjectsToVersion" />
    </CreateItem>
    <Attrib Files="@(WixProjectsToVersion)" Normal="true" />
    <FileUpdate Files="@(WixProjectsToVersion)" 
Regex="SimpleVersion=.*;DetailedVersion=.*&lt;" 
ReplacementText="$(WixVersions)&lt;" />

The $(WixVersions) property is generated earlier in the build process.  I then 
use the MSBuild task in the PackageBinaries target to compile the WiX projects.

    <MSBuild Projects="$(SolutionRoot)\Setup.wixproj"
                  Properties="OutputPath=$(BinariesRoot);Configuration=Release" 
/>

Simple, yet effective.

John Burns
Notion Solutions, Inc.
214.405.8926 - [email protected]<mailto:[email protected]>

From: [email protected] [mailto:[email protected]] On Behalf Of Jansen, David
Sent: Tuesday, January 20, 2009 4:41 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
Other lists you might want to join: http://www.codify.com/lists
________________________________
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
Other lists you might want to join: http://www.codify.com/lists
________________________________
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
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]<mailto:[email protected]>
Subscribe: [email protected]<mailto:[email protected]>
Unsubscribe: [email protected]<mailto:[email protected]>
List FAQ: http://www.codify.com/lists/oztfs
Other lists you might want to join: 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

Reply via email to