The issue you’re experiencing typically occurs when there’s a conflict with “Imports” in UiPath. You might be importing a namespace that’s already somewhere in the dependency tree or is conflicting in some way.
To resolve this issue, You can try the following steps:
Verify your imports: Go to the ‘Imports’ panel in UiPath Studio and ensure that you haven’t imported System.ComponentModel twice, remove if it is there.
Ensure that the ‘System’ is only imported once. Sometimes, importing both ‘System’ and System.ComponentModel can cause issues.
Check your dependencies: You may also be utilizing a custom library or package that has already imported the System.ComponentModel namespace.
After performing the above steps, you should be able to resolve the error.
I also experienced this while I had a Windows Legacy project that imported a custom Library that I made and hosted on UiPath Orchestrator Cloud. I kept seeing this issue. I just have to remove the second duplicate line of “System.Collections.ObjectModel” from the workflow .xaml within the main UiPath project that is invoking the library activity and it fixes the issue. I wonder why this started happening? Maybe the new UiPath Studio 2022.10.3 or version 2022.10.4 is the culprit when you edit a new workflow that is running an old Library activity?