How do I build only a few projects contained in a solution using MSBuild?

I am trying to customize a TFS Team build and new to MSBuild. I have a solution that contains multiple projects (MyProject1, MyProject2, ..). I find that the command build setup I could only choose which solution should be built and when the build is done, the build target for all projects becomes the same and the output for all projects is put into the deployment folder on the build server.

Is there a way for me to build only one or a few solution projects without building everything, because I want some of them to be built?

Can I create solution files with MSBuild only, or can I specify individual projects to build?

                   

Can anyone give me the msbuild syntax if possible?

0
.net tfs msbuild team-build


source to share


3 answers


You can create additional solution configuration in your solution eg. called "Build". In this configuration, only create the projects you want. In your teambuild project file, use this element to indicate that only your "Build" configuration should be built.



Another option is to create a separate solution containing only the projects you want to create.

+1


source to share


From the build menu, select "batch build" and this will allow you to rebuild only the projects you select and also has the ability to do them in different modes (eg release and debug).



0


source to share


You can just create a project; from the command line like

msbuild.exe some.csproj

see also

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

0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics