How do I use a custom activity in a build template?
The easiest way to add an activity to a build definition is to actually have the build definition as part of the same solution. If you are using separate source controls for current build templates and your activities, then you can either move the build templates permanently into a solution file as an activity library, or keep copying the build template to your main project. For now, what I will do is move the build template and change the source in the build definition later. Add a new Activity Library project to the solution, as follows:
We delete the ActivityDesigner1.xaml
file, which was automatically created for us, and then copy and paste the CustomTfvcTemplate.12.xaml
file we saved earlier into this project. Set Build Action to Content. Now open your template file, and when all the workflow steps are collapsed, it should look something like this: