Windows compatibility issues with Windows-Legacy

Updating all of my processes to Windows, since it is stated Windows-Legacy will no longer be supported going forward.

I understand difference between the .NET Framework and .NET is causing there to be compatibility issues when converting from Legacy to Windows. However many of these incompatibilities are not obvious. I have updated all missing activities and such, and now nothing shows as an error. However when I run or debug I immediately get the below error:

An item with the same key has already been added. Key: VisualBasicValue1_1 System.ArgumentException: An item with the same key has already been added. Key: VisualBasicValue1_1 at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)

I learned that there are a number of things in the code that must be updated that are not highlighted in Studio as errors until you run or debug.
For example, the following all worked in Legacy, but no longer with Windows:

  • [object] Is Nothing must be updated to IsNothing([object])
  • double quotes must be updated to " double quotes
  • assigning a blank array as {} must be updated with new String() {}, or whatever datatype used

I found out each of these either from trial and error or from different scattered UiPath Forum Posts.
My question now is, is there a full list anyone has of these common compatibility issues that must be fixed? Because I have implemented all of the above with on project, and I’m STILL getting an error that I can’t track down, and it’s ridiculous spending more hours trying to find the problem.

1 Like


Please check this…This could help


Thanks for pointing me here; I have not seen this yet and it is definitely helpful (although still missing some important ones like the “Is Nothing” issue).

I believe right now I’m dealing with 2.9 Unable to debug run. Can you help me decipher the solution? It says Solution : We can fix it to modify xaml file directly using text editor, as this is caused by duplicated same key. (Please make a backup file to edit xaml file)

I opened Main.xaml in a text editor–what am I looking for?


Search for the keys present in it…and check if there is duplicate and remove it…

To not loose data use a backup to modify

Also yea these are few which were mostly identified…Feel free to add which might help as well…as still new are being explored


As in every key in every dictionary? There are a total of 108 dictionaries and 332 keys throughout the file. I actually did just spend some time scrolling through each one but nothing stood out as a duplicate key in any of the dictionary.


Check in your code if ut is failing on any specific activity ot in the panel we see line numbers for few exceptions…can check those and try to restrict


That’s the problem with this issue. Running now works fine and it does not fail, but Debugging fails prior to even running. The window says “Unable to start execution”

Logs do not appear to be useful:
System.ArgumentException: An item with the same key has already been added. Key: VisualBasicValue1_1 at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)
at UiPath.Executor.Tracking.ActivityIdsResolver.Register(WorkflowInfo workflowInfo)
at UiPath.Executor.Tracking.DebugTrackingParticipant.RegisterWorkflow(WorkflowInfo workflowInfo)
at UiPath.Executor.DebuggerPlugin.UiPath.Executor.IDebuggerPlugin.RegisterWorkflowTracking(WorkflowInfo workflowInfo)
at UiPath.Executor.Tracking.WorkflowTracking.RegisterWorkflowTracking(WorkflowInfo workflowInfo)
at UiPath.Executor.WorkflowRuntime.RegisterWorkflow(WorkflowInfo workflowInfo)
at UiPath.Executor.RobotRunner.InitWorkflowApplication()
at UiPath.Executor.RobotRunner.ExecuteJob()

My problem was solved here:

This underscores the importance of having an all-inclusive post that is easy for customers to find. The update from Windows-Legacy to Windows is not a smooth process by any means.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.