I have just recently upgraded to the latest version of UI Path Studio (Version 2023.4.3) and started a new project and tried to update the UiPath.UIAutomation.Activities to the latest version.
After updating, I got an error “Collection was modified; enumeration operation may not execute”.
Error: RemoteException wrapping System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.HashSet1.Enumerator.MoveNext() at System.Linq.Enumerable.SelectManySingleSelectorIterator
2.MoveNext()
at System.Linq.Enumerable.DistinctIterator1.MoveNext() at System.Collections.Generic.HashSet
1.UnionWith(IEnumerable1 other) at System.Collections.Generic.HashSet
1…ctor(IEnumerable1 collection, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToHashSet[TSource](IEnumerable1 source, IEqualityComparer
1 comparer)
at System.Linq.Enumerable.ToHashSet[TSource](IEnumerable1 source) at UiPath.Studio.Plugin.Workflow.Services.ProjectAssemblyContainer.FilterAssistantAssemblies(String[] paths, String projectDirectory) at UiPath.Studio.Plugin.Workflow.Services.ProjectAssemblyContainer.LoadAssemblies(String[] paths, String projectDirectory, TargetFramework targetFramework) at UiPath.Studio.Plugin.Workflow.Configuration.ProjectProcessServiceHost.LoadAssemblies(String[] paths, String projectDirectory, TargetFramework targetFramework) at UiPath.Studio.Project.Services.ProjectIpcService.ExecuteStageOneOpen(ProjectProcessOpenStageOneArgs args) at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext() --- End of stack trace from previous location --- at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext() --- End of stack trace from previous location --- at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext() --- End of stack trace from previous location --- at UiPath.CoreIpc.Helpers.Timeout[TResult](TimeSpan timeout, List
1 cancellationTokens, Func2 func, String message, Func
2 exceptionHandler), HResult -2146233088
I also have the same type of bug when I tried to open my projects created with the older version of UI Path studio, something I never experienced when I have upgraded from a much older version to the 2022 one.