Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <blockquote> <p>your best option is to put the common things on the build machine in $(MSBuildExtensionsPath) which resolves to C:\Program Files\MSBuild </p> </blockquote> </blockquote> <p>I dislike the idea of taking a dependency on "magic" locations. You end up needing a 2nd deployment + QA process just to keep your build scripts in sync...</p> <blockquote> <blockquote> <p>Only the items in the build folder (under TeamBuildTypes) are automatically retrieved by the Team Build.</p> </blockquote> </blockquote> <p>Kinda lame, admittedly, but I haven't found it to be a major limitation in practice. Here's a simplified look at my TeamBuild folder:</p> <pre><code>$/TeamProject |- Dev |- Module1 |- Module2 ... Solution1.sln Solution2.sln |- TeamBuild |- 3rdparty MSBuild.Community.Tasks.dll MSBuild.Community.Tasks.targets RandomScriptOffTheWeb1.targets ... |- SrcSrv srcsrv.ini ... |- SymStor dbghelp.dll ... Common.targets TFSBuild.proj TFSBuild.Common.targets TFSBuild.Config1.targets ... UtilityScript1.ps1 ... |- Main ... |- TeamBuild ... |- Release ... </code></pre> <p>Common.targets is imported by all *.csproj (etc) files. It imports all of my 3rd party tasks, initializes various global properties/items, and sets up reference paths. </p> <p>TFSBuild.proj imports Common.targets, then TFSBuild.proj, then one of the config files by conditioning on $(BuildDefinition). That way the more specific always override tasks/properties/etc from less specific files as needed. Still, this short file is the one place where I do feel limited: it would be much nicer to programmatically map build names to filenames, but MSBuild won't let me make [declarative] imports depend on properties set in [runtime] targets like .</p> <p>TFSBuild.Config*.targets files only set properties, for the most part; no "real" work. These encompass Team Build properties that I want to parametrize, plus others that control how my custom targets (implemented elsewhere) will work.</p> <p>TFSBuild.Common.targets is the longest file by an order of magnitude. Here I configure all of the Team Build properties with good defaults, override targets like AfterDropBuild, and define lots of my own custom targets which execute conditionally based on what's set in the Config* files.</p> <p>Note: I obviously have the <a href="http://blogs.msdn.com/jpricket/archive/2007/12/10/changing-the-recursion-type-for-the-initial-get-that-team-build-does.aspx" rel="nofollow noreferrer">recursive download option</a> on, but it's not strictly required. Separating build depedencies into subfolders is more for aesthetics than anything.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload