Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)
Complete results are contained in the Data property of this exception. Please correct the errors in the source and retry the Load.
at System.Activities.XamlIntegration.ActivityXamlServices.Compile(IDynamicActivity dynamicActivity, LocationReferenceEnvironment environment)
at System.Activities.XamlIntegration.ActivityXamlServices.Load(XamlReader xamlReader, ActivityXamlServicesSettings settings)
at System.Activities.XamlIntegration.ActivityXamlServices.Load(XmlReader xmlReader, ActivityXamlServicesSettings settings)
at System.Activities.XamlIntegration.ActivityXamlServices.Load(Stream stream, ActivityXamlServicesSettings settings)
at UiPath.Executor.WorkflowLoader.LoadWorkflow(String workflowFile)
at UiPath.Executor.WorkflowRuntime.Load(String workflowFile)
at UiPath.Executor.RobotRunner.InitWorkflowApplication()
at UiPath.Executor.RobotRunner.d__86.MoveNext()
Our team looked into the issue and it comes down to a weird way this specific assign activity was coded in the XAML file. It points to an object while you are assigning a string:
The quick and easy fix here is to:
remove str_NewNumber from the assign activity
save the workflow
add str_NewNumber to the assign activity
This is a workaround.
As to the cause, we are not quite sure how to reproduce the root cause of the wrongly set variable type in the underlying xaml file.
Could you maybe share the steps you took? It would help us properly fix the issue
I just fixed a similar error message.
I had to look into the .xaml and found where the was an Object instead of the expected string. I also had to change the next mention of ‘Object’ in the mca:CSharpReference line to ‘String’ as well.
I knew I was expecting a string because in another nearly identical flow it was a string.