robot
2023.4
false
UiPath logo, featuring letters U and I in white

Robot User Guide

Last updated Dec 18, 2024

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, you can change the packages installation folder from %userprofile%\.nuget\packages to a different path, like %userprofile%\.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><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.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.