Register-SPWorkflowService throws InvalidData, DirectoryNotFoundException on 15TEMPLATEWorkflowActivities directory

I was setting up a new SharePoint 2013 environment and hit this issue when registering workflow manager with SharePoint 2013.  Thought I’d share this out so that it helps others who might run into this issue.

Here’s the sequence of my installation.

1. Installed SharePoint 2013 RTM + SP1 and then SharePoint 2013 November CU 2014.  Ran PSConfigUI.exe – successful.

2. Installed Workflow Manager 1.0 Refresh by downloading it through Web Platform Installer.  Provisioned Workflow Manager farm – successful.

3. Installed Microsoft Office Developer Tools for Visual Studio 2013 – November 2014 Update through Web Platform Installer. <<< This steps appears to be the culprit as this deletes the 15\TEMPLATE\WorkflowActivities folder and the DLL within it >>>

image

4. Then issued the Register-SPWorkflowService command to register the WFM farm with SharePoint 2013 and hit the below error.

image

Before installing Office Developer Tools November 2014 Update, the WorkflowActivities folder had Microsoft.SharePoint.WorkflowServices.Activities.dll in it.

image

After installing Office Developer Tools, the WorkflowActivities folder was deleted.

image

After hitting this error, I just had to pick this assembly from the .NET 4.0 GAC and copy it into 15\TEMPLATE\WorkflowActivities folder after creating WorkflowActivities folder under \15\TEMPLATE path.

The path I copied this assembly from is: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SharePoint.WorkflowServices.Activities.  [NOTE: If you have latest CU of SharePoint 2013 installed (like SharePoint 2013 November CU 2014) then you’ll see 2 versions of this assembly (15 and 16) in the GAC.  You need to pick the 15 version of this assembly].

image

I then copied over this assembly to \15\TEMPLATE\WorkflowActivities folder after manually creating this folder.

image

Post this, I issued the Register-SPWorkflowService command with the –Force switch.

image

That fixed this issue for me and I was able to develop 2013-platform workflows and run it.

HTH!