Windows Workflow Foundation 4.0 Designer Rehosting with Custom Activities

Posted by Robert on Stack Overflow See other posts from Stack Overflow or by Robert
Published on 2010-12-28T15:48:44Z Indexed on 2010/12/28 15:54 UTC
Read the original article Hit count: 172

I have several WF 4.0 workflows that I have created for an application my company is developing. Some of these workflows are simple, and some are very complex (i.e. many steps, several different types of activities, custom activities). For many of these workflows, I have created several custom code activities to support some internal process types.

The workflows work great and we have had very few problems when it comes to maintaining them within VS 2010. We now want to move that responsibility off to our business users, so I have created a WPF application to rehost the WF designer (according to the MS samples). My problem is that when I open one of the workflows that contains custom code activities, those activities are represented as red boxes with the error message of "Activity could not be loaded because of errors in XAML."

I have done research and have found several posts that mention that this is usually a problem with namespacing and referencing. The rehosted designer is in a namespace similar to this:

Company.Application.Workflow.Designer

And the custom code activities are contained within a separate custom workflow library, which I have included as a reference in the designer project. The library's namespace is similar to this:

Company.Application.Workflow.Data.Activities

As I have mentioned, the library is set as a reference in the designer's project, and I see it being copied to the output when I build the project. I have also included the reference in the XAML of the main designed application.

What am I missing?

© Stack Overflow or respective owner

Related posts about Windows

Related posts about workflow-foundation-4