Building SharePoint Workflows with Visual Studio and VSeWWF

Visual Studio 2005 + VSeWWF + WSS v3/MOSS 2007 SDK = Workflow templates. VS 2008+ has built-in support. Important for SharePoint workflows.

This recently bit me and after some investigation, I thought it would be good to put this information out there.

Before Visual Studio 2008, you could build workflow templates with Visual Studio 2005 provided you installed (1) the VSeWWF to get the workflow designer, debugger, base activity library in the VS Toolbox and workflow project templates & (2) either the WSS v3 or MOSS 2007 SDK to get the SharePoint specific workflow templates. The only thing you needed to run these guys in a SharePoint v3 site was to have the .NET Framework 3.0 installed, which was no issue because that was already a prerequisite for WSS v3.

Visual Studio 2008, when you elect to include the Office dev tools as part of the install, gives you a template to create SharePoint 2007 [Sequential|Statemachine] Workflows. What’s cool about this template is that it now lets developers hit F5 to do debugging without having to manually deploy and attach the debugger. Visual Studio does the association with a local SharePoint site’s list. Very cool. Unfortunately it expects the Feature definition file that is used in deployment lives in the root of a project. Of course most of the world isn’t doing this, rather we mimic the “12” folder in our projects. For us, the F5 debugging doesn’t help a darn bit. So unfortunate… oh well, such is life.

If you haven’t built a workflow in VS2008 for SharePoint, check out Robert Shelton’s screencast on his blog … great little sample to watch (and a good blog to subscribe to at that).

Another thing was bugging me though: In order to get the SharePoint workflow template in Visual Studio 2008 to show up, you had to select the .NET Framework 3.5 as your target. Hmm… ok, so the Framework is now additive in nature these days. For instance, .NET 3.0 is really .NET 2.0 +SP1 + WPF + WCF + WWF + CardSpace. So does targeting .NET 3.5 really matter? Apparently it does. If you build a workflow with Visual Studio 2008 and use this template, your server MUST have .NET 3.5 installed. At present, Microsoft does not officially support SharePoint running on .NET 3.5, but rest assured, I’m sure they are working on it for a post SP1 update. Just keep this in mind when building workflows for your customers.

Andrew Connell
Developer & Chief Course Artisan, Voitanos LLC. | Microsoft MVP
Written by Andrew Connell

Andrew Connell is a web & cloud developer with a focus on Microsoft Azure & Microsoft 365. He’s received Microsoft’s MVP award every year since 2005 and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s the founder of Voitanos and is dedicated to helping you be the best Microsoft 365 web & cloud developer. He lives with his wife & two kids in Florida.

Share & Comment