Search code examples
c#wpfxamlworkflow-foundation-4

WF4 re-hosted in WPF : Loading saved workflows does not work with the published application


I downloaded this Workfloff project by Ron Jacobs. It is a simple solution with three (Activity, ActivityDesigner and a WPF Rehosted) projects.

Project image

In debug mode, everything runs perfectly. But after I publish the project with ClickOnce, I can not load any saved XAML workflow files with the published application!? The message "Could not generate view" appears in the designer and I get the error message "The component 'MyActivityLibrary.Designer' does not have a resource identified by the URI '/MyActivityLibrary.Design;component/myactivitydesigner.xaml'". But actually the URI is in theere <sap:ActivityDesigner x:Class="MyActivityLibrary.Design.MyActivityDesigner". I must mention that this error only occurs with workflows which has their own custom designer.


Solution

  • The solution Ive found was to merge both Activity libraries into one library class. Now I have one Activity library with all the activities together with the designers. And one WPF application library.