workflow-foundation-4

activity could not be loaded because of errors in the XAML


Considering the following scenario:

  1. Create MyCodeActivity1 with argument MyArgument1
  2. Add this activity to a myworkflow.xaml
  3. Rename MyArgument1 in MyCodeActivity1 to MyRenamedArgument1

If you open myworkflow.xaml, visual studio will show this error:

activity could not be loaded because of errors in the XAML

Is there a facility where visual studio can give more information about the error please? For now I have created a small windows application that tries to execute the workflow and shows an error message if invalid. This does give a clear message. But it would be great if visual studio provided this functionality directly.


Solution

  • Another reason for the error "activity could not be loaded because of errors in the XAML", is bad dlls. So check the project references for any yellow triangle, or check the history of the project.