What is NuGet?
NuGet is the package manager for .NET.
- It is an essential tool through which developers can create, share, and consume useful code. Often such code is bundled into "packages" that contain compiled code (as DLLs) along with other content needed in the projects that consume these packages.
- NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.
- For .NET (including .NET Core), the Microsoft-supported mechanism for sharing code is NuGet, which defines how packages for .NET are created, hosted, and consumed, and provides the tools for each of those roles
- Put simply, a NuGet package is a single ZIP file with the .nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number
Flow of packages
This feature is inherited for the Activities and the Process management. The Studio uses the feeds configured in Package Manager. By default, it will have three feeds configured
These are loaded from Nuget.config which is available at below location:
- C:\Program Files (x86)\UiPath\Studio
Also add custom feeds for custom packages. These feeds get added into the Manage Package and are loaded from below location.
Note: Studio only access the feeds which are mentioned in the above config files. The Studio does not know about Orchestrator feed.
As there is a difference in the NuGet versions that we have implemented in different versions of Studio/ Robots the activities/ process loads and install location is different in different versions of the Product.
Activities Installation Mechanism:
- When an activity is installed using the package manager it gets extracted into a specified folder based on the version the location can be different.
Studio (with NuGet 2) 17.1, 18.1, 18.2 Community & Enterprise
- NuGet Cache (for remote activities feeds, e.g. www.myget.org): C:\Users\user\AppData\Local\NuGet\Cache
- Activities install location: C:\Users\user\AppData\Local\UiPath\Activities
- Activities load (by the studio - file in use) location (copy by UiPath PlatformDelete the package in use from here which currently in use):C:\Users\user\AppData\Local\Temp\nuget
Studio (with NuGet 4) >= 18.3 Community & Enterprise
- NuGet Cache (for remote activities feeds, e.g. www.myget.org):C:\Users\user\AppData\Local\NuGet\v3-cache
- Activities extract and load location (restore location) C:\Users\user\.nuget\packages (if a job is started from Orchestrator or Tray also the processes are restored here)
- All the packages that were installed while publishing the projects are considered listed as a dependency for that particular process.
- If the packages are installed like excel, pdf, terminal and the associated activities have not been used, it will still be counted as the dependencies.
Where we can see the dependency?
The .nupkg file contains the list of dependencies which can be seen via NuGet Package explorer tool.
Note: From version >=18.1 these dependencies are also listed in the project.json file.