Subscribe

UiPath Robot

The UiPath Robot Guide

NuGet packages not accessible after migration

Observed Behavior

After converting a Robot from Service-Mode to User-Mode, the XML files in the NuGet Packages aren't accessible after the migration is complete and the following error message is displayed:

"Access to path C:\Users\john.doe\.nuget\packages\HelloWorld\1.0.0\lib\net45\Main.xaml is denied".

Cause

When the Robot is deployed in Service Mode, packages are downloaded and installed in a folder (e.g. .nuget\packages) by the Local System user that the robot is running service under.

When converted to User Mode, NuGet packages from that folder are no longer accessible as the current user that runs the Robot does not have permissions to view or edit those files.

Solutions

1. Deleting all packages from the original folder:

If you choose to delete packages from the original folder, the Robot reinstalls the processes in the configured folder under the user's permission. This way, the Robot has access to the files whenever it needs to run them.

2. Changing the packages folder:

When converting the Robot from Service-Mode to User-Mode, also change the folder name from .nuget\packages to .nuget\packages_new.

This causes the Robot to re-create the .nuget\packages folder and download the processes in it so they can later be used.

By default, activities packages are downloaded and installed in the %userprofile%\.nuget\packages folder. You can set a different folder in one of the following ways:

  • During installation, by installing from the command line with the option PACKAGES_FOLDER.

  • After installation, by manually editing the uipath.config file:

    1. Open the uipath.config file in a text editor. By default, the file is located in C:\Program Files\UiPath\Studio.
    2. In the packageSettings node, add the packagesInstallationFolder key with the path to the new folder as its value.
    3. Save the changes and restart the robot.

    For example, add the following to uipath.config to change the download location to C:\nuget.

<packageSettings>
  <add key="packagesInstallationFolder" value="C:\nuget" />
</packageSettings>

For more details around the differences between Service-Mode and User-Mode Robots, read the according to deployment document which provides a more detailed description of each type of Robot.

Updated 3 months ago


NuGet packages not accessible after migration


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.