Hi, I try to write the Windows Work Flow tutorials' examples. The created activities work when I run the examples, but when I need to change them via Designer, I see the "Activity could not be loaded because of errors in the xaml" error message on some components. I couldn't resolve the issue till now. I tried to load the XAML file to troubleshoot it via the below code:
try
{
XamlServices.Load("C:\\User\\CMMS\\Windows Work Flow Examples\\CreateAnActivity\\NumberGuessWorkflowActivities\\StateMachineNumberGuessWorkflow.xaml");
}
catch (Exception e) {
Console.WriteLine(e.StackTrace);
throw e;
}
And I saw the below message in the program's console:
An unhandled exception of type 'System.Xaml.XamlObjectWriterException' occurred in NumberGuessWorkflowHost.exe
Additional information: No matching constructor found on type 'System.Activities.Activity'. You can use the Arguments or FactoryMethod directives to construct this type.