Team Services | TFS 2017 | TFS 2015 | Previous versions (XAML builds)
After you have a Windows build agent, in just a few steps you can define a CI build process that compiles and tests your .NET app whenever your team checks in code.
Define your process
Create the build definition.
Specify the code you want to build and select the continuous integration (CI) trigger.
Save the definition.
Queue your new definition to make sure it works.
Your team now has a CI build to validate every change chcked into your codebase!
Should I use the Visual Studio Build step or the MSBuild step?
If you are building a solution, in most cases you should use the Visual Studio Build step. This step automatically:
/p:VisualStudioVersionproperty for you. This forces MSBuild to use a particular set of targets that increase the likelihood of a successful build.
Specifies the MSBuild version argument.
In some cases you might need to use the MSBuild step. For example, you should use it if you are building code projects apart from a solution.
Where can I learn more about MSBuild?
How do I build multiple configurations for multiple platforms?
On the Variables tab, make sure you've got variables defined for your configurations and platforms. To specify multiple values, separate them with commas.
For example, for a .NET app you could specify:
Name Value BuildConfiguration debug, release BuildPlatform any cpu
For example, for a C++ app you could specify:
Name Value BuildConfiguration debug, release BuildPlatform x86, x64
On the Options tab select MultiConfiguration and specify the Multipliers, separated by commas. For example:
Select Parallel if you want to distribute the jobs (one for each combination of values) to multiple agents in parallel if they are available.
On the Build tab, select this step and specify the Platform and Configuration arguments. For example:
Can I build TFSBuild.proj files?
You cannot build TFSBuild.proj files. These kinds of files are generated by TFS 2005 and 2008. These files contain tasks and targets are supported only using XAML builds.
What other kinds of apps can I build?
What other kinds of build steps are available?
How do we protect our codebase from build breaks?
Git: Improve code quality with branch policies with an option to require that code builds before it can be merged to a branch. This option is not available for GitHub repos.
TFVC: Use gated check-in.
How do I modify other parts of my build definition?
Specify your build steps to run tests, scripts, and a wide range of other processes.
Specify build options such as building multiple configurations and creating work items on failure.
Specify the repository to pick the source of the build and modify options such as how the agent workspace is cleaned.
Set build triggers to modify how your CI builds run and to specify scheduled builds.
Specify general build definition settings to specify how completed builds are named and change other options.
Specify build retention policies to automatically delete old builds.
I selected parallel multi-configuration, but only one build is running at a time.
If you're using Team Services, you might need more concurrent pipelines. See Concurrent build and release pipelines in Visual Studio Team Services.
How do I see what has changed in my build definition?
Do I need a build agent?
You need at least one agent to run your build. Get an agent.
I can't select a default agent queue and I can't queue my build. How do I fix this?