Bug resulting in RemoteException wrapping System.InvalidOperationException: Compilation failures

I’ve been using UiPath with C#, and recetly came across this error that I have never seen before.

Error Message: RemoteException wrapping System.InvalidOperationException: Compilation failures occurred:

Cannot implicitly convert type 'object' to 'decimal'. An explicit conversion exists (are you missing a cast?)	Cannot implicitly convert type 'object' to 'decimal'. 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 xamlPath, String compiledWorkflowAssemblyName)
at UiPath.Executor.WorkflowRuntime.Load(String workflowFile)
at UiPath.Executor.RobotRunner.InitWorkflowApplication()
at UiPath.Executor.RobotRunner.d__88.MoveNext()

I tried double-checking the program and even checking the XAML file, but I still am unable to find the issue.

XAML File:
updateCostV2.xaml (559.6 KB)

Hi @deranker ,

Have you tried Debugging the Workflow ?

By Debugging we can get to know, which Activity is giving out this Error and then We can Continue our Analysis from that Point.

As it a Workflow Containing many Activities in a Single xaml, we would recommend to Split it into different workflows and Invoke them, Also Renaming of the Activities would help us Identify the Error Point faster.


The following might help you.


1 Like

I actually came across that post before posting this topic. I tried searching within the XAML file but I cant seem to find the same root of the issue mentioned in that post. Which is why I posted this topic because I cant think of any other possible issues that can cause this.

I tried to debug the file but I just get the same error pop up window.

It doesnt show which activity is causing the issue. It may be that I am doing the debugging wrongly, so is there another way that would show which activity is causing the issue?

@deranker ,

By Looking at the Error you receive even when Debug, I would say we would have to go again through the Post @Yoichi Suggested.

I might have been able to Spot the Error with the variable arrMAzure :

Wherever there is an Assign of arrMAzure[0], Change it to the below and Check :

arrMAzure[0] = Convert.ToDecimal(arrMAzure[0]) +(Convert.ToDecimal(CurrentRow[16].ToString())/12)

You can find the arrMAzure[0] by using the Universal Search Option and make the Changes.

If this doesn’t work out, we may need to Edit the xaml file using Notepad++

You might need to take a Backup of the xaml before doing the changes.

Thank you for your help. I opened up the XAML FIle again to double check and found the error after searching for “X:Object” within the file. It was one of the Assign Activities at the start of the workflow.

But still, thank you for taking the time to help me with this and I sincerely appreciate your efforts.

1 Like


I just modified the xaml file as the following. There were some sentences to be modified. Can you try this?

updateCostV2-2.xaml (574.0 KB)


PS. Perhaps you should review your workflow to improve maintainability, i think.

Alright, thank you so much for helping me out. Been trying to solve this problem for 3 days now.