Setting Up TFS Team Build To Use TFS Build Extensions

The other day I was reminded of how great TFS Build Extensions really are.  I’ve used them in the past and currently use them and still have not tapped there fullest resources but find they are always there to do 99% of what I need done.  If you are using TFS and team build, these are a must.  In this post I’m going to do a quick run through on setting up build extension on your build machine as well as your local development environment.  A more detail version of what I summarize below is found in the TFS Build Extensions Documentation.

1.  Download the TFS Build Extensions from http://tfsbuildextensions.codeplex.com/.  Unzip content into C:\Tools\.

2.  Follow the directions in TFS Build Extensions Documentation to check in these build extension into the {team project}\BuildProcessTemplates\Custom Assemblies.  This will be used by the build controller/build agent as well as you when you are working on the build workflow and need toolbox items.

Below is an example of a team project with the Custom Assemblies folder under BuildProcessTemplates and a ProcessTemplates.sln which has 1 project to house our build definitions.

image

3.  After following the setup steps TFS Build Extensions Documentation you will be able to create a workspace to your build templates folder, get latest, and open the build template project the documentation had you create.  The key to being able to work on the template on your development machine is to include the TFS extension in your toolbox.  Following the documentation will have you setup for this so your development will look like the following.  In the toolbox I added the items from the library TfsBuildExtensions.Activities.dll, which should be in your {team project}\BuildProcessTemplates\Custom Assemblies\ folder.

image

Using WPF and Vector Graphics

Recently I’ve been taking a look at WPF, Microsoft’s not so new now replacement for WinForms.  With the little free time that I have, I’ve relied heavily on Pluralsight for getting up to speed on various technologies.  In working with WPF, I was trying to leverage their concept of “lookless” controls which is very powerful and much nicer to design with than WinForms. 

To summarize my tribulations, I was having a hard time loading a local resource that was a SVG.  Blend Expression, a WPF designer, doesn’t support SVG directly but it does support .pdf (a form of SVG) and .ai (Adobe Illustration).  There are a couple of ways to product .pdf or .ai files.  My approach was to use a tool I’ve used in the past, Inkscape, see Inkscape A Cool Tool.  Inkscape also support generating a XAML file directly from the SVG file which you can leverage directory or copy the contents of XAML output into a resource dictionary.

1.  Open or create your SVG file in Inkscape.

2.  PDF format: Select Save As and choose .pdf format.  It will display a dialog as below once you click Save, ensure you select “Convert texts to paths”, then click OK.  Once the file is saved you can rename the file extension from .pdf to .ai.  It will now be recognized in Expression Blend.

image

 

3.  XAML format:  Select Save As and choose .xaml format.  This will export it directly to a XAML file.  You can take the content line, element is a ViewBox, and put that directory in a resource file.