Hello.
I am trying to use the system.threading.tasks.parallel.for function in invoke code for my use case in my latest community UiPath. There will be no error on invoke code, and the namespace, class and methods all can be seen clearly via intellisense as I type them out in invoke code.
Now I have already implemented it on UiPath’s new coded automation feature (both coded workflow and coded source file) way before i posted this question, so lack of an assembly should not be an issue in this case. However, I cannot use the coded feature on my end and need to use invoke code instead.
Thus, I am interested to make it work on invoke code activity and not any other typical solutions (e.g., such as the default parallel.foreach activity in UiPath, or using performer/dispatcher, etc). I am open to using external c# or vbnet scripts that is triggered by UiPath if that is doable (which is beyond my current knowledge base).
As for what I have tried to make invoke code work: I have did the basic namespace import, the assembly manipulation on the xaml level, tried downloading the tasks.parallel and threading.tasks class package to UiPath itself, manipulated the .netframework being used… all of it didnt work (maybe i did it wrongly?)
So to the community, please do try out implementing the parallel for loop code on invoke code on your machine (UiPath 23 version onwards) and see if you could make it work. If so, do share your magic.
Here are some screenshots of the error (both vbnet and c# invoke code version)
vbnet
c#