2

I'm trying to launch a workflow, previously saved in a xaml file with UIPath Studio, from a visual studio project (c#).

Here the code:

string pathToWorkflow = appl.Default.XAMLPath;
System.Activities.Activity workflowAsActivity = System.Activities.XamlIntegration.ActivityXamlServices.Load(pathToWorkflow);
System.Activities.WorkflowInvoker invoker = new System.Activities.WorkflowInvoker(workflowAsActivity);
Dictionary<string, object> param = RiempiParam();
invoker.Invoke(param);

This code generate this exception:

Impossibile creare il tipo sconosciuto (Impossible to create the unknown type) '{http://schemas.uipath.com/workflow/activities}WindowScope'.

The project already refer to UiPath.Interop.dll, the same used in uipath studio.

What's wrong?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291

2 Answers2

2

These means that you don't have the package of activity that defines WindowScope installed. This should be in the core activities. Any chance you removed it by mistake?

Andra Ciorici
  • 301
  • 1
  • 7
0

Go to the Dependencies Packages and make sure it's installed or doesn't require maintenance. Had a similar problem before when downloading a project via Git as some of the dependencies weren't checked in by the other user.

craig157
  • 355
  • 1
  • 3
  • 18