I’m using the latest Studio and Robot versions of 23.10 on Orchestrator Cloud.
Trying to start using the UiPath CLI for packing and deploying projects, but it is been quite a challenge (was having same issues on 23.4 as well).
First, when packing projects the the CLI, many times it will pack and deploy without error. Then when trying to run the package from a robot, the job instantly fails with the message “Could not load file or assembly ‘UiPath.System.Activities, Version=23.10.2.0, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.” I tried editing Orchestrator deployment settings to “Only tenant feed” as well as “Both host and tenant feeds” selected, and same issue with both. After lots of trial and error I found weird workarounds that get this to work. Below are the steps:
- Replace the packages “UiPath.System.Activities” and “UiPath.UIAutomation.Activities” with “UiPath.System.Activities.Runtime” and “UiPath.UIAutomation.Activities.Runtime”
- This will now result in strange errors showing up when packing via CLI. Things that are not an issue at all when publishing straight from Studio. For example, every xaml file with a Matches activity was resulting an the error:
Unable to create activity builder for [xaml filename]. Reason was 'Cannot set unknown member 'UiPath.Core.Activities.Matches.FirstMatch'.'.
Similar issue for any file with a GetLastDownloadedFile activity:Cannot set unknown member 'UiPath.Core.Activities.GetLastDownloadedFile.FileResource'.'.
- Fix the above errors by replacing opening the xaml files in a text editor, finding each occurrence of the above activities, and delete the
FirstMatch="{x:Null}"
from the Matches activities, and delete theFileResource="{x:Null}"
from the GetLastDownloadedFile activities. I could not find a way to resolve these issues from Studio itself (creating a variable to store these outputs did not work). - Once all errors are cleared, CLI will successfully pack, deploy, and run correctly from the robots.
Big problem with this “solution” - after I replace the packages “UiPath.System.Activities” and “UiPath.UIAutomation.Activities” with the runtime equivalents, I cannot use any activities that are from these packages, i.e. click, type into, etc… They aren’t available in the Activities tray. If you add the packages back (and have both the runtime and design time packages), then you can use the activities in Studio again, but cannot pack via CLI.
Anyone else experience this and have a fix that will make leveraging the CLI not a huge hassle?