An item with the same key has already been added. Key: VisualBasicValue`1_1
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()
System.Xaml.XamlObjectWriterException: Cannot set unknown member ‘{http://schemas.microsoft.com/netfx/2009/xaml/activities}VisualBasic.Settings’. at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at System.Xaml.XamlServices.Load(XamlReader xamlReader)
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__99.MoveNext()
This is perfect. I am using RE Framework where the Nothing constant is being used all over the place and replacing them with Nothing as a method and not a constant, works.
This one worked for me too. I tried fixing this for a couple of months. I do now know how did you think about this, but I wish I found you earlier. Thank you!
I also had the same issue with my modified ReFramework after converting to the new compatibility.
But then I checked out how a new project based on the official ReFramework looks with the Windows-compatibility and there they are still using the “TransactionItem IsNot Nothing” etc. conditions in the transitions.
So I simply re-wrote the conditions exactly how they were before and the errors disappeared as well.
Anyway, converting all of my processes from legacy to Windows seems to be not working as smooth as I’d hoped for.
Do you happen to have a sample project that reproduces this issue from before the change?
I’m asking because it could be that simply clearing the field, saving, and then redoing what was there might fix the issue.
I tried to reproduce this, but creating a new Legacy ReFramework project on Studio 2022.12 and then converting it to a Windows project did not reproduce this issue.
I want to confirm that in my case, simply cutting out (Ctrl-X) the full Condition statement with Nothing, and then pasting it back in will fix the issue as well. No need to rewrite using isNothing() method.
And this only needs to be done within the State Transitions in the Main.xaml file (a quick Ctrl+F for “Nothing” in the file identifies the points to change):
I have too the same error after Windows Conversion from windows legacy.
I fixed it just by modifying a condition “result=True” by “result= True” (add a space before the word True)
Ok it’s strange.
In fact, i noticed that xml code has changed with this modification :
Before : <VisualBasicValue x:TypeArguments="x:Boolean" ExpressionText="result=True" sap2010:WorkflowViewState.IdRef="VisualBasicValue1_1" />`
After : <VisualBasicValue x:TypeArguments="x:Boolean" ExpressionText="result= True" />
Attribute “sap2010:WorkflowViewState.IdRef” with value “VisualBasicValue`1_1” was already used in this xml file. By modifying element (add space by exemple) this attribute is removed
Had same issue, just copying and pasting didn’t do it because the file didn’t detect any changes, added spaces to all conditions in the transition states in main, saved it that way, and now it works