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

Creating custom activities


A build definition is made up of a whole lot of components, called activities. Let's start creating our own activity by creating a new Activity Library, as shown in this screenshot:

Figure 13: A new Activity Library project

First, let's delete the Activity1.xaml file that was created for us in the project. Next, add a code activity called DocumentBuildActivity.cs. You will find the Code Activity item template under the Workflow section in the Add New Item dialog. Now, we need to add a reference to Microsoft.TeamFoundation.Build.Client.dll. We are going to use NuGet for this package instead of searching for our local machine as we did previously in this chapter.

There is a NuGet package that is now available for TFS 2015 and contains all the object model assemblies in it. To do this, we will open Package Manager Console in Visual Studio and then make sure that http://www.nuget.org/ is set as the package source. Your activities project is selected as the default project...