Recurring - Invoke Code Activity: Assembly with same name is already loaded


We are trying to move some of our projects from legacy to Windows version, but all of the Invoke Code activities trigger a failure.

I have found two orphan threads in the forum.
The stable Studio version we installed is 21.10.4 from the customer portal, but I see that this may have been fixed in 22.2. Can we confirm this?

  1. Invoke Code Activity: Assembly with same name is already loaded - Feedback / Activities - UiPath Community Forum

  2. Assembly With same name already loaded - Help / Forum - UiPath Community Forum

I think this is important to know why this occurs and how to fix this without reinstalling Studio. The legacy version had no errors on the same workflow.

Our alternative solution
In our case, we avoided this failure by using the Invoke Method activity as the code activities failing validation were single line. But others who have longer code in Invoke Code activity may need to be aware of this bug.

1 Like

Hi @jeevith

I think we will need to wait for a reply from @alexandru for more details, but if he’s already mentioned that this was fixed in 2022.2, then the fix should carry over to the newest version as well. It is probable that this was a bug and installing a new version that includes the fix is the only working solution.

@alexandru do you know if this was fixed in a later version than 21.10.4?

Yes, we fixed a lot of issue with the windows compilation. I also recall some fixes with the invoke code.

I recommend trying 22.8-preview or 22.10 that will be released in a few weeks as this might be already fixed.