Most of the time when I’m developing and I have to learn something new – a new API, a new event model, etc. – or I just need to try something that I don’t know whether it will work or not I create a new project (often with a name that begins with the prefix of TEST). These projects are where I prove out the technology before integrating it with the core code of the project. The test project always gets cataloged into a special place in the source control system, and rarely gets directly moved into the main project.
However, every once in a while I guess right and I put together a technology proof (test if you prefer) that works like I want the production to work like. Today was one of those rare days when I created a new Workflow Activity the way I wanted it.
After I got it checked in I did a bit of source control work to share the test code over to the core project so I could include the files. (I branched after the share so the files are now on their own unique paths.) I added the working activity to my core project and… it didn’t work. I got this really ugly error when I tried to open the design surface for the activity. It said in part:
The service ‘System.Workflow.ComponentModel.Design.IIdentifierCreationService’ must be installed for this operation to succeed. Ensure that this service is available.
After I stared at the screen wondering how to figure this out, searched for answers (and came up with nothing), I started looking into the project file and found that there are two necessary pieces to make the workflow designer surface to work. The first entry that’s necessary belongs in the <PropertyGroup> and is:
<ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Basically, it’s saying that it’s a workflow project and it’s a C# project. If you’re using VB, create a new custom workflow activity then open the project file in notepad and you should see a different ProjectTypeGuids node that you can use.
The second part is an import statement that just goes inside of the root <Project> node. It is:
<Import Project=”$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.0\Workflow.Targets” />
Adding these two entries to your project file makes the workflow extensions work in Visual Studio and can make your custom activity work – even when you started with a standard class library.
20 Comments
Thanks for posting, just was trying move a workflow I created into an existing feature in a class library. Searched for ‘System.Workflow.ComponentModel.Design.IIdentifierCreationService’ had this and was done a couple of minutes!
Thanks – this worked like a charm!
Thanks for the help man! My Import actually turned out to be:
But you got me going down the right path.
Thank you very much. It works!
Thanks for the help!
Thanks, a real saver.
In 3.5 use c3.5 in the ImportProject tag.
Awesome – thanks!!
Thank you so much! Simple fix! It worked great!
Thanx a lot! this solution has been very usefull!!!
Thanks for the blog post. I ran into this problem when moving a workflow from a workflow project to a WSP sharepoint project.
nice work around. i came to your blog in searching of the same very problem :)
Thanks, simple fix for my problem. Well described and easy to implement.
Thanks a lot!, I was doing a MS WWF Tutorial and faced this problem, your solution was exactly what I needed
Thank you very much! this solve problem for me!
That was awesome…Thanks for the help :)
where this changes will go?
Where we need to put this lines?
thank you very much! you solved my problem
Thanks! This helped me out…
Thanks for the help!!!