So, you’ve all downloaded and installed your copy of Team Foundation Server 2012 and Visual Studio 2012, right? Of course you’re migrated all your code and servers over to TFS2012 and VS2012, right? (Answer: heck yes! We’ve been running it in production since the Alphas!) NICE!
Anyway…I’ve been doing some TFS2012 build customization work lately and working on porting my custom TFS build activities to .NET 4.5 and all the latest and greatest. When I’m editing a custom XAML build script with custom activities in it, I find that it’s helpful to be able to compile my build scripts before I check them in to TFS so that I can hopefully make sure that they’re error-free.
The way that I do this is to create a Workflow Console Application (Figure 1) and then add my TFS2012 Build Script (*.xaml) to this project (Figure 2).
(Feeling lazy? You can skip these steps and just download my project.)
Figure 1 – Create a Workflow Console Application
When I first add the build script to the new project, I’ll get a zillion compile errors because the script makes a lot of references to assemblies and none of these assemblies have been added to the References for the project yet.
Here are the references that need to be added to your project and where to find them:
- C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies
- C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0
- Assembly References
Once you add these references to the project, you can then modify the XAML script through the designer and then run Build Project to verify that it doesn’t have any compile errors.
Want that project? Download
I hope this helps.
– Looking for help getting rolling with Team Foundation Server 2012? Need some pointers on how to customize your TFS2012 Builds? Want to move your Scrum or Agile project management tasks in to Visual Studio 2012 and TFS2012? Drop us a line at email@example.com.