What is NuGet?
NuGet is the package manager for .NET.
- It's 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
We inherit this feature 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
<!-- Add this repository to the list of available repositories -->
<add key="Local" value=".\Packages" />
<add key="Official" value="https://www.myget.org/F/workflow/" />
<add key="Community" value="https://gallery.uipath.com/api/v2" />
We can also add our custom feeds for custom packages. These feeds get added into the Manage Package and are loaded from below location.
<add key="CustomPackagees" value="D:\CustomPackages" />
<add key="CE" value="https://gallery.uipath.com/api/v2" />
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.
- This means if you have installed the packages like excel, pdf, terminal but 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.