1
votes

I am trying to add a new build process template (XAML) to TFS 2010, using VS 2017. I have committed it under the BuildProcessTemplates folder for the team project and it is shown in the Source Control Explorer, but it doesn't show up in the drop down list on the Process tab of the Build definition dialog. The drop down list only shows the other 3 templates (DefaultTemplate.xaml, UpgradeTemplate.xaml...) in the folder.

I found this description of how the dropdown list works:

This list is populated with the following build process templates:

  1. The ones that come out of the box (DefaultTemplate.xaml, UpgradetTemplate.xaml and LabDefaultTemplate.xaml). These are created for every new team project (this can be changed by modifying the process template)
  2. Any build process templates that have previously been added for any other build definitions in the same team project.

The last bullet is a bit unintuitive, but it means that if a developer creates a new build definition in team project A, and adds a new build process template (for example by by selecting New and then browse to an existing .xaml file), this build process template will be available in the process dropdown list for all other build definitions in team project A. It will not be available in team project B, but has to be added in the same way. https://blog.ehn.nu/2010/11/managing-build-process-templates-in-tfs-2010-build/

I tried clicking on "New..." next to the drop down list. It only shows the option to "Select a team project that contains your build process template", there's no option to create a new one.

If I enter the path to the .xaml file under "Path in repository" and click on OK I get an error: "Object reference not set to an instance of an object" Screenshot of error

How do I make the new build process template available for build definitions?

1

1 Answers

1
votes

Normally, you just need to check in the template xaml files under the BuildProcessTemplate folder, then in Build Definition Process tab, Click New… button to add these xaml files from that fold. The path of xaml should have a \ sample in front of it.

enter image description here

In your case, also try to clear TFS and VS cache, then try it again.

If delete cache folder still doesn't work, please try it with older Visual Studio Version such as Visual Studio 2015 and create a new build definition, select the template.

Also take a look at this blog shows the customize process template experience in TFS 2013, which may be helpful.