Skip to content

Getting started with the GUID activity

rfennell edited this page Aug 3, 2014 · 3 revisions

The GUID activity returns either a GUID or a Cryptographically Secure GUID. This can be stored in a build variable used wherever it is needed in your workflow. In this example we aim to show the basic steps that are required to get the activity integrated into a build.

Before you can make use of any of the TFS 2010 community build activities you have to make sure they are available for the build system and on your development PC. Instructions for this process can be found in the ALM Rangers build guide or in the getting started page of this wiki. This page assumes the GUID activity is available in the developers build process workflow toolbox.

Step 1 Add some variables to store the GUID

First we need to create the variables to store the generated GUID. In most cases you will create a single string variable as you will want the GUI as either unformatted or formatted. In this case we want to see both so two variables

Screenshot

Step 2 Add the GUID activity

The GUID activity can be created anywhere in the build workflow.

In this sample we generate a GUID and then write it to the build log

Screenshot

The only properties needed for the GUID activity are the output variables. You can choose if your Create a standard or secure GUID using the Action property, but this defaults to a standard GUID

Screenshot

Next we written the GUID variable via a WriteBuildMessage activity

Screenshot

Running the build

You should see something similar to the following the Build View Log, remember it will only be shown in the log, not the summary

Guid Formated GUID is 5f473984-1a1a-43e5-98a0-cfd6e9a7fd54 Unformated GUID is 5f4739841a1a43e598a0cfd6e9a7fd54

Clone this wiki locally