问题
Does anybody know how can I configure TFS Build to build a set of projects in a solution instead? The solution I have, has 16 projects but for one of my build definitions I want some of them to be compiled.
回答1:
The easiest way in my opinion is to create a new solution file. There is nothing stopping you from having several solutions that reference the same projects (or some subset).
The other way is to create a new configuration. In Solution Explorer, rightclick the root node -> Configuration Manager. In addition to standard configs like "debug" or "release" you can create your own custom ones. For each combination of config + platform, you can use the checkboxes below to define which projects will be built and what settings they'll use.
Whatever you choose, you'd edit your TFSBuild.proj file to point to the desired solution and/or configuration. MSDN instructions: http://msdn.microsoft.com/en-us/library/bb399127.aspx
回答2:
Once you create your build it will make a TFSBuild.proj file in source control (you can right click on the build in Team Explorer and select Configuration Folder to find it.
Open this file and find the tag that has "SolutionToBuild". That tag has sub tags for specifying targets. I think if you enter the projects you want to build in there (semicolon delimited) then it will just build those.
回答3:
If you have not made your build yet then (as John Saunders said) you can specify the projects in the setup of the build. (After you have set it up you cannot do that again.
来源:https://stackoverflow.com/questions/1012600/building-a-set-of-specific-projects-in-tfs