Build your app

Define the build process

Build your code automatically every time you check it in to catch problems early.

  1. If you haven't already, upload your code to TFVC or GIT.

  2. In team explorer, go to the builds page.

    Go to builds page

  3. Create a build definition.

    New build definition in the team explorer builds page

  4. Give it a name.

    Name and optional description in the general tab of the build definition dialog

  5. Set the trigger to indicate when to run the build. In this case, use the CI trigger to run the build whenever code is checked in.

    Continuous integration radio button in the trigger tab of the build definition dialog

  6. Map source control folders to build agent folders.

    Use default folders in the workspace tab of the build definition dialog

    Mark folders as cloaked that don't need to be copied to the build machine - this reduces build time and cost.

  7. Select to use the hosted build controller. If your team needs the binaries from this build, you should copy them to the server.

    Choose hosted build controller, and copy build output to source control in the build defaults tab of the build definition dialog

  8. If you are using Visual Studio 2013, select TfvcTemplate.12.xaml.

    Selecting TfvcTemplate.12.xaml on the Process tab

  9. Provide the path to the code that you want to build.

    Specifying projects on the Process tab

    Save your new build definition. Now, whenever you check in code for this solution, it will be built automatically.

Verify the build process

  1. Queue a build for the build definition that you created.

    Queue new build in the builds page of Team Explorer

    Your build is queued.

    The queued build appears under My Builds in the builds page of the Team Explorer

    You've created your first build in the cloud! Because it's a CI build, any time a team member checks in new code, a build is kicked off. This can go a long way in helping your team find and fix build-related issues early.

Q & A

Q: Are there any restrictions if I want to use a hosted build controller?

A: Yes, there are some. Learn more here.

Q: Is there more information to help me fix my build issues?

A: Yes. Diagnose build problems.

Q: Can I improve the performance of my CI build?

A: Learn more here.

Q: Can I get more information about using the default build templates?

A: Learn more about these build templates.

Try this next