Build non-MSBuild projects in Team Build.

This task is based on the DevEnv task written by Aaron Hallberg (http://blogs.msdn.com/aaronhallberg/archive/2007/07/12/team-build-devenv-task.aspx). 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: 3.5.0.0

Examples

Xml Copy imageCopy
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="DeployFiles" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <!-- Please be aware that the rest of the build file is ommited for brevity -->
    <PropertyGroup>
        <!-- Tell Team Build not to override $(OutDir), so that we can build once from MSBuild and not rebuild when DevEnv.com is executed. -->
        <CustomizableOutDir>true</CustomizableOutDir>
    </PropertyGroup>
    <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. -->
        <ItemGroup>
            <SolutionOutputs Condition=" '%(CompilationOutputs.Solution)' == '$(Solution)' " Include="%(RootDir)%(Directory)**\*.*" />
            <SolutionOutputs Include="$(SolutionRoot)\Setup1\$(Configuration)\**\*.*" />
        </ItemGroup>
        <Copy SourceFiles="@(SolutionOutputs)" DestinationFolder="$(TeamBuildOutDir)" />
    </Target>
</Project>

Inheritance Hierarchy

System..::..Object
  Microsoft.Build.Utilities..::..Task
    Microsoft.Build.Utilities..::..ToolTask
      MSBuild.ExtensionPack.Tfs2010..::..DevEnv

See Also