Team Build, exclude a project.

I have team build successfully building a solution, however, the solution contains a database project (*.dbp) which produces a warning of "*.dbp is not supported by MSBuild and cannot be built".  Is there any way to exclude this from even being attempted to be built in the TFSBuild.proj



Answer this question

Team Build, exclude a project.

  • rsknowles

    Hi Ridge,

    The TFSBuild.proj file only gives an option to choose which solutions to include/exclude in the build process. In order to exclude building a project that is part of the solution, I am afraid you will have to modify the solution file itself. You can either edit the .sln file in notepad or open the solution in VS and choose "Exclude Project"  in the context menu that appears on right clicking the project node in the solution explorer.

    Thanks for using Team Build!

    - Anu


  • Robert Frye

    You can remove the DBProject.sln from the list of solutions to build and use devenv to build it. and then copy all the other executables in the project to Output directory

    <Target Name="AfterCompile">

    <Exec Command = "&quot;D:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv&quot; &quot;$(SolutionRoot)\Project1\Project1.sln&quot; /build &quot;Debug|Any CPU&quot;" WorkingDirectory="$(SolutionRoot)"/>

    <Copy Condition=" '$(IsDesktopBuild)'=='false'"

    SourceFiles="$(SolutionRoot)\ClassLibrary1\bin\Debug\ClassLibrary1.dll"

    DestinationFolder="$(OutDir)"/>

    </Target>


  • Yahooadam

    Hi Anu,

    Can I do the same thing in VS Pro 2005 I don't see the "Exclude Project" in the context menu. I do find the place to exclude building the project. (Right click solution node -> Configurate Manager). it works fine in VS that it excludes building the project. But when I used MSBuild, it doesn't work. The project is still included in the build.

    Is there a way to manually edit .sln to exclude a project in MSBuild

    Any thoughts

    Thanks!



  • Team Build, exclude a project.