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:
![](https://static.packt-cdn.com/products/9781785888199/graphics/4960_07_13.jpg)
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...