Build non-MSBuild projects in Team Build.

This task is based on the DevEnv task written by Aaron Hallberg ( It is used here with permission.

Required: TeamFoundationServerUrl, BuildUri, Solution or Project, SolutionConfiguration, Target Optional: AdditionalCommandLineSwitches, ProjectConfiguration, OutputFile, Version, SolutionPlatform

Remote Execution Support: NA

Namespace: MSBuild.ExtensionPack.Tfs2010
Assembly: MSBuild.ExtensionPack.Tfs2010 (in MSBuild.ExtensionPack.Tfs2010.dll) Version:


Xml Copy imageCopy
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="DeployFiles" ToolsVersion="3.5" xmlns="">
    <!-- Please be aware that the rest of the build file is ommited for brevity -->
        <!-- Tell Team Build not to override $(OutDir), so that we can build once from MSBuild and not rebuild when is executed. -->
    <Target Name="AfterCompileSolution">
        <!-- Use the DevEnv task to build our setup project. -->
        <MSBuild.ExtensionPack.Tfs2010.DevEnv TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Solution="$(Solution)" SolutionConfiguration="$(Configuration)" SolutionPlatform="$(Platform)" Target="Build"/>
        <!-- Copy all compilation outputs for the solution AND the setup project to the Team Build out dir so that they are copied to the drop location, can be found by unit tests, etc. -->
            <SolutionOutputs Condition=" '%(CompilationOutputs.Solution)' == '$(Solution)' " Include="%(RootDir)%(Directory)**\*.*" />
            <SolutionOutputs Include="$(SolutionRoot)\Setup1\$(Configuration)\**\*.*" />
        <Copy SourceFiles="@(SolutionOutputs)" DestinationFolder="$(TeamBuildOutDir)" />

Inheritance Hierarchy


See Also