DotNetSurfers

Latish Sehgal's Blog

Working With a Windows Workflow Service in a non-Workflow Client Project

I just wasted a day trying to figure out something that should have worked out of the box with Visual Studio. Hopefully, this can save somebody some time. I have been working with Windows Workflow (.Net 4, Visual Studio 2010) over the last week and my project required me to call a Workflow Service from another workflow hosted within a Windows/NT Service. I created the Workflow Service and when I built a test client for it using a Workflow Console application, the activities from the service show up just fine in the client workflow.

However, when I add reference for the Workflow service in the NT Service, no new activities are available in a workflow inside the NT Service project. It looks like Visual Studio parses the service reference differently based on the type of client project. I ended up comparing the csproj files manually for my console workflow client and NT service workflow client. By copying the following entry to the NT service project file, I was able to get it to behave consistently:

{32f31d43-81cc-4c15-9de6-3fc5453562b6};{FAE04EC0-301F-11D3 -BF4B-00C04F79EFBC}

It seems that the first guid represents a workflow project type and the second one stands for a Windows C# project.

Comments