Thanks for the reply -

I've headed down that road for shared build logic before - but because of
the number of build types we have, I was looking for a way to actually use
the exact same tfsbuild.proj (and version control folder as specified in the
build type).

The solution I have below works, but I was wondering what other folks were
up to in this regard...

On Wed, Jun 25, 2008 at 4:24 PM, Steven Nagy <[EMAIL PROTECTED]>
wrote:

>  Hi Scott,
>
>
>
> You can do an import of a msbuild file that is above the current team build
> definition.
>
> So for example, source control might look like this:
>
>
>
> $\TeamBuildTypes\BuildType1
> $\TeamBuildTypes\BuildType2
> $\TeamBuildTypes\Shared
>
> In the shared one you can put a single file with all the logic you have
> just described. Then you can import it from your TFSBuild.proj file. However
> you are going to have to add some extra logic to get that shared folder
> contents before everything else.
>
> Which means overriding BeforeEndToEndIteration in your actual TFSBuild.proj
> file to get the shared folder out of source control (using a workspace might
> be too late because it won't pull that folder until CoreGet target
> executes).
>
>
>
> Also, you can use the .rsp file to specify properties for team build.
>
> Regards,
>
> *Steven Nagy
> *Readify | Senior Developer
>
> M: +61 404 044 513 | C: [EMAIL PROTECTED] | B:
> stevennagy.spaces.live.com
>
> *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of
> *Scott Colestock
> *Sent:* Thursday, 26 June 2008 6:21 AM
> *To:* [email protected]
> *Subject:* [OzTFS] Sharing tfsbuild.proj across build types -
>
>
>
> Is there a well-known practice for having multiple build types (in Team
> Build 2008) use a common project file, but still be parameterized in various
> ways?
>
> I've been a little frustrated that you can't specify msbuild command line
> flags in a build definition (like /property, for instance.)
>
> To compensate, here is what I've done...
>
> I've defined an item group as follows at the top of my tfsbuild.proj, where
> the identity of each item correspond to the name of a build definition.
> Each item has some set of metadata that you want to use in parameterizing
> the build.
>
>    <ItemGroup>
>       <BuildType Include="Dev_Core">
>          <SomeProp>Foo</SomeProp>
>          <BranchToBuild>DevRefactor</BranchToBuild>
>          <BaseBuildName>1.6</BaseBuildName>
>       </BuildType>
>       <BuildType Include="QA_Coret">
>          <SomeProp>Foo</SomeProp>
>          <BranchToBuild>DevRefactor</BranchToBuild>
>          <BaseBuildName>1.6</BaseBuildName>
>       </BuildType>
>    </ItemGroup>
>
> Then, I override BeforeEndToEndIteration (so BuildDefinitionName is
> defined) and I do the following:
>
> <Target Name="BeforeEndToEndIteration">
>
>       <CreateProperty Value="%(BuildType.SomeProp)"
> Condition="'%(BuildType.Identity)'==$(BuildDefinitionName)">
>          <Output TaskParameter="Value" PropertyName="SomeProp" />
>       </CreateProperty>
>
>       <CreateProperty Value="%(BuildType.BranchToBuild)"
> Condition="'%(BuildType.Identity)'==$(BuildDefinitionName)">
>          <Output TaskParameter="Value" PropertyName="BranchToBuild" />
>       </CreateProperty>
>
>       <CreateProperty Value="%(BuildType.BaseBuildName)"
> Condition="'%(BuildType.Identity)'==$(BuildDefinitionName)">
>          <Output TaskParameter="Value" PropertyName="BaseBuildName" />
>       </CreateProperty>
>
> ....
>
>    </Target>
>
> Does this seem reasonable?  Do other folks have a better solution ?
>
> --
> scott colestock
> trace ventures, LLC
> 612.559.0580 OzTFS.com - to unsubscribe from this list, send a message back
> to the list with 'unsubscribe' as the subject. View the web archives at
> http://www.mail-archive.com/[email protected]/
> Powered by mailenable.com, supported by www.readify.net
>  OzTFS.com - to unsubscribe from this list, send a message back to the list
> with 'unsubscribe' as the subject. View the web archives at
> http://www.mail-archive.com/[email protected]/
> Powered by mailenable.com, supported by www.readify.net




-- 
scott colestock
trace ventures, LLC
612.559.0580



OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject. View the web archives at 
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net

Reply via email to