Resolving SharePoint 2013 workflow development issue

Let's tackle the SharePoint 2013 workflow development issue, recommends updating tools after creating workflow pre-Service Pack 1.

By Last Updated: June 21, 2014 3 minutes read

I’ve seen an issue pop up a few times over the last few months related to workflow development in SharePoint 2013 that has been quite annoying. After deciding enough is enough, I’m going to figure this out once and for all.

TL;DR

You create a workflow for SharePoint 2013, either for either on-premises or Office 365, prior to SharePoint 2013 Service Pack 1. You then update your developer environment to the latest tools - at the time of this post, that’s the March 2014 update for the office Developer Tools. Then when you open the same workflow project, many of the activities are not recognized & the project cannot be deployed. To fix this you need to manually update references in your project file.

The Error Scenario

As you might be aware, I’ve published three workflow courses for Pluralsight on SharePoint 2013 / Office 365 workflow development. The courses are as follows:

All of these courses used SharePoint 2013 prior to Service Pack 1 and the latest developer tools available. I use demos from these courses frequently in my presentations. However I noticed that when I opened these projects, that all worked just fine at the time, recently many of them would not deploy and would be filled with errors. What gives? in fact many of the projects I did for customers were not working either and people were asking me the same questions. I was stumped because I didn’t see anything in the usual forums about this. After experiencing this on multiple development machines and using different environments, something certainly seemed amiss.

All I had done was upgrade my developer tools to the latest update, the March 2014 update that shipped in conjunction with SharePoint 2013 Service Pack 1.

Here’s what I would see… when I would open a project in Visual Studio 2013 that had the March 2014 tools update, I’d see some activities displayed as errors:

SharePoint 2013 Workflow Designer Activity Errors

SharePoint 2013 Workflow Designer Activity Errors

When you looked at the project in the Visual Studio Solution Explorer tool window, you’d see some red indicators on the project and on the workflow project item:

SharePoint 2013 Workflow Errors in Solution Explorer

SharePoint 2013 Workflow Errors in Solution Explorer

And even worse, when I opened the Error tool window, I’d see a flood of errors related to activities:

SharePoint 2013 Workflow Errors

SharePoint 2013 Workflow Errors

The Fix

Usually when you see something like this after an update to Visual Studio, it’s the result of some assembly reference or the result of a breaking change. Thankfully the latter isn’t the case… it’s an assembly reference problem. However if you are creating SharePoint 2013 workflows in SharePoint apps, there is no list of assembly references in the Solution Explorer tool window.

What you want to do is open the Visual Studio project file, *.csproj, in a text editor and search for the following two references:

These two references changed in the latest tools. It’s unfortunate that there wasn’t an automatic project update and I can’t find anything on the inter webs, support docs or in the forums. What you need to do is replace the two lines in the project file with the following two lines:

Notice the name of the activities changed as did the version references. Once you do this and reopen the project in Visual Studio 2013, all the errors go away and you can now deploy the project again.