views:

149

answers:

3

I’m trying to set up Team Foundation Build and so far it’s running ok with builds, tests and code analysis.

My problem is, that I can’t figure out how to build just a subset of the projects included in the solution. I know how to use the configuration manager to create custom solution configuration that will build/deploy a selection of my projects. But when I create a new build definition, I only get the default “Debug” and “Release” configurations.

alt text

How do I set up a Team Foundation Build that only includes a selection of the projects in the solution?

I know I may be on the completely wrong track here, but I've been digging around for a while and so far it's my best guess.

A: 

I think, you already answer your question: put the subset of the projects into the new solution and create new build definition for this solution.

What other configuration would you expect then Release and Debug?

Petr Felzmann
+1  A: 

You will need to edit the TFSBuild.proj file generated by Build Definition created.

I have never used it to specify other configuration, but try using ConfigurationToBuild:

<ItemGroup>    
   <ConfigurationToBuild Include="Release|Any CPU">
      <FlavorToBuild>Release</FlavorToBuild>      
      <PlatformToBuild>Any CPU</PlatformToBuild>
   </ConfigurationToBuild>
</ItemGroup>
joerage
I just love Microsoft tools. [/sarcasm]
jnylen
I'll give it a try, I was hoping I could avoid having to edit the proj file, but it seems there's no easy way around it - unless I want to go with Petr Felzmann suggestions, which is also somewhat sub-optimal for our use.
Jakob Gade
+2  A: 

Your custom configurations won't appear in the build definition wizard because we don't parse the solution file format. You can, however, just type it in and that will work just fine without manually editing the TFSBuild.proj file.

Jim Lamb
I had never notice that! Thanks for the info.
joerage
AWESOME!! Exactly what I needed ... and shamefully obvious once you know the answer. :) Thanks!
Jakob Gade
Bummer, more problems. I've posted a followup question, http://stackoverflow.com/questions/1837733/excluded-projects-block-team-foundation-build-test-step. Do you have a briliant answer for this one too? :)
Jakob Gade