Can't run from Attendant - dependency version conflict

I built the entire process in Studio (WIndows compatibility) and have no trouble Debugging/Running it in Studio. But after publishing to Orchestrator, when I try to run it from Assistant I get:

System.Exception: "NU1107: Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 4.5.0-2.22527.10 directly to project 0000-RPACoE-Queue_Schema_Builder.1.0.1-alpha to resolve this issue. 
 0000-RPACoE-Queue_Schema_Builder.1.0.1-alpha -> 0000-RPACoE-Queue_Schema_Builder 1.0.1-alpha -> UiPath.System.Runtime.Windows 23.4.3 -> Microsoft.CodeAnalysis.Common (>= 4.5.0-2.22527.10) 
 0000-RPACoE-Queue_Schema_Builder.1.0.1-alpha -> 0000-RPACoE-Queue_Schema_Builder 1.0.1-alpha -> UiPath.Form.Activities 2.0.3 -> Microsoft.CodeAnalysis.CSharp.Scripting 3.8.0 -> Microsoft.CodeAnalysis.Common (= 3.8.0)."

I’m using UiPath.Form.Activities 2.0.3 because it’s much simpler and less buggy. This dependency uses Microsoft.CodeAnalysis.Common 3.8.0 but it won’t resolve to the higher version in UiPath.System.Activities:



I tried the solution the error message presents, which is to directly install this version in my project:


But the version inside UiPath.Form.Activities still won’t resolve.

I guess now I’m stuck downgrading UiPath.System.Activities to whatever will work with UiPath.Form.Activities 2.0.3…hopefully not breaking any of my other code.

NOTE: UiPath.System.Activities 22.10.7 directly has Microsoft.CodeAnalysis.Common 3.8.0 inside it so this works with UiPath.Form.Activities 2.0.3 and doesn’t appear to have broken any of the system activities in my project.

Spoke too soon. After the downgrade of UiPath.System.Activities I’m now getting:

For Each - properties: Unable to cast object of type 'Newtonsoft.Json.Linq.JProperty' to type 'System.Collections.Generic.KeyValuePair2[System.String,Newtonsoft.Json.Linq.JToken]'.`

Which is odd because Newtonsoft.Json is in UiPath.UIAutomation.Activities.

I solved this by changing the TypeArgument of the For Each to JProperty. Then I had to change all usages of currentItem.Key to currentItem.Name - that was the only resulting property reference issue.