So, we’ve been working on putting our SharePoint solutions through a proper build process in Team Foundation Server 2010 (TFS), and I hit a bit of a snag.
I had been given a build definition that had a build process – a Workflow Foundation workflow – that I wanted to alter. The problem was that while I had the XAML file for that workflow, and the DLL that defined some custom code activities that the process used, I didn’t have a full Visual Studio project for it. No problem, I thought, I’ll just open the XAML up in Visual Studio and edit it.
While I could open the XAML file, it was not displayed such that I could edit it, and the custom code activities showed up as errors. What I really needed to be able to do was make this a proper Visual Studio project to edit. But how? Well…
- Create a new Visual Studio Project. Use the Workflow > Activity Library template.
- Remove the XAML file that is automatically added to the new project. You can delete it.
- Add your existing XAML file.
- Add references to any additional assemblies that your project uses.
Presto – I could now edit my workflow within Visual Studio. I checked this into TFS (to sit alongside the code for my project) and changed my build definition to use my newly edited process.