Book Image

Team Foundation Server 2015 Customization

By : Gordon Beeming
Book Image

Team Foundation Server 2015 Customization

By: Gordon Beeming

Overview of this book

Table of Contents (17 chapters)
Team Foundation Server 2015 Customization
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

Figure 15: Adding a new activity library to the project

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:

Figure 16: The build template workflow...