I've been stuck on this for a day now. I've made a solution that lets the user create workflows in a designer and save them, as well as run them. Now I'm trying to get these saved workflow files to run from another solution that gets the filenames from command line arguments. I reference the required DLLs from the other project, in this case [companyname].Activities.dll. Yet I still get this error when I try to run a workflow that consists of just a "SendEmailActivity"(located under Activities.Acd) or "RunWorkflow"(located under Activities) :
Cannot create unknown type '{clr-namespace:[companyname].Activities.Acd;assembly=[companyname].Activities}SendEmailActivity'.
and
Cannot create unknown type '{clr-namespace:[companyname].Activities;assembly=[companyname].Activities}RunWorkflow'.
I've tried making workflows with just stock activities, and those run. It's just the activities contained in my custom Activities class that are finicky. This is the main bit of how I'm running the workflows:
Activity lActivity = ActivityXamlServices.Load(filename);
lWFApp = new WorkflowApplication(lActivity);
lWFApp.Run();
If anyone has any experience with this sort of thing, I'd love a tip.
Turns out it was just an environment thing. The solution I was adapting to run workflows was targeting 4.0, and the custom activities were 4.5. Quick update to the project target fixed it all. I hate these kind of problems.