I cannot add workflow item to my WPF project.
I create a new WPF project and want to add a sequential workflow. When I do "Add new item" there is no item template to select.
Any hints?
I don't think you can simply add a workflow to a WPF project. You need to create a WF project and build your workflow in that, then reference the WF project.
Although this is not officially supported, you can make pretty much any Visual Studio project support workflows doing steps compiled by Robert L. Bogue in his blog article.
Just in case if the original post becomes unavailable, here are his steps (tested on Visual Studio 2008 SP1):
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 and is:
{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
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 node. It is:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With