views:

288

answers:

3

I am trying to setup a TFS Team Build and am new to MSBuild. I have a solution that contains a few projects (MyProject1, MyProject2, ..). I find that setting up the team build I could only select which solution should be built and when performing the build the build target for all the projects becomes the same and the output for all projects is all put into a deploy folder on the build server.

Is there a way for me to only build one or a handful of the projects of the solution without building the whole thing as I only want part of them built?

Can I only build solution files using MSBuild or can I specify individual projects to be built?

Could anyone give me the msbuild syntax if this is possible?

A: 

In the build menu select "batch build" and this will allow you to rebuild only the projects you select plus it has the ability to do them in different modes (like release and debug)

Lodle
Not really what I am looking for as I am building the MSBuild script on a build server and not through VS. Can I only build solution files using MSBuild or can I specify individual projects?
Fadeproof
There is a program that i use called automated build studio, it cost money but allows for a very powerful build script. You can download a trial from http://www.automatedqa.com/products/abs/index.asp
Lodle
A: 

You could create an additional solution configuration in your solution, e.g. called "Build". In that configuration only build the projects you want. In the teambuild project file use the element to specify that only your "Build" configuration should be built.

Another option would be to create a separate solution only containing the projects you want to build.

Martin
A: 

You can just build a project; from the command-line use e.g.

msbuild.exe some.csproj

See also

http://msdn.microsoft.com/en-us/library/ms164311.aspx

Brian