Deployment to UiPath Studio - rpapub/WatchfulAnvil GitHub Wiki
Caution
Content needs proof-reading.
There are two ways to deploy custom rules to UiPath Studio. The first method is to copy the .dll
files to the appropriate folders in the UiPath Studio installation directory. The second method is to create a NuGet package and publish it to a local or networked NuGet feed. Both have advantages and disadvantages.
The first method is the most straightforward and is suitable for quick testing and development, but requires Windows Explorer access to the installation directory. It is also less robust, as it does not allow for easy versioning or distribution of the custom rules. It is however the installation-wide solution, meaning that all users and all projects of the UiPath Studio installation will have access to the custom rules.
The second method, creating a NuGet package, is more complex but allows for easier distribution and versioning of the custom rules. It also allows for easier testing and deployment in different environments. But with nupkg files being a dependency on a per-project basis, it means that only one project has access to these custom rules. This method is not recommended for production deployment because dependencies for the static code analysis have no justification to be present in a production package.
To ensure your custom UiPath Studio Workflow Analyzer rules dll files are correctly deployed and detected, follow these steps. The deployment process depends on your UiPath Studio version, the installation mode, and the project type you are working with (i.e., legacy or Windows projects).
These instructions document the deployment of both legacy and Windows projects, as the maintenance of "legacy" projects is still a requirement for many organizations.
Important
Placing the dll files in the correct folder is essential for the rule to show up in the Workflow Analyzer settings.
To identify the UiPath Studio version:
- Open UiPath Studio.
- Go to Help under the Settings menu.
- The Studio Version will be displayed there. Note the version for reference.
You need to know whether UiPath Studio is installed in user mode or system mode. Here’s how to identify the installation mode:
-
For System Mode: The installation is done for all users on the machine and typically resides in
C:\Program Files\UiPath\Studio\
. -
For User Mode: The installation is for the current user only and typically resides in
C:\Users\<YourUsername>\AppData\Local\Programs\UiPath\Studio\
.
You can verify the installation mode by checking where UiPath Studio is installed:
-
System Mode: Installed in
C:\Program Files\UiPath\Studio\
-
User Mode: Installed in
C:\Users\<YourUsername>\AppData\Local\Programs\UiPath\Studio\
UiPath Studio supports two types of projects:
-
Legacy Projects: These projects target .NET Framework 4.6.1 (
net461
). -
Windows Projects: These projects target .NET 6.0 (
net6.0
).
The Workflow Analyzer will use different sets of rules based on the project type:
-
For Legacy Projects (
net461
): The analyzer will use the.dll
compiled for .NET Framework 4.6.1 (net461
). -
For Windows Projects (
net6.0
): The analyzer will use the.dll
compiled for .NET 6.0 (net6.0
).
This distinction is important because depending on the project type, UiPath Studio will invoke different custom rules for analysis.
Once you've identified your UiPath Studio version, installation mode, and project type, you can deploy your custom rules .dll
file to the appropriate folder.
Here are the instructions for
- UiPath Studio Version ≥ 2024.10
- UiPath Studio Version between 2021.10 and <2024.10
- UiPath Studio Version < 2021.10
For UiPath Studio version 2024.10 and newer:
-
Target Folders:
-
System Mode:
%ProgramFiles%\UiPath\Studio\Rules\net8.0
-
User Mode:
%LocalAppData%\Programs\UiPath\Studio\Rules\net8.0
-
System Mode:
-
DLL to Install:
- Prepare to install the
.dll
file fornet8.0
:C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net8.0\HelloWorld.WorkflowAnalyzerRules.dll
- Prepare to install the
For UiPath Studio versions between 2021.10 and before 2024.10:
-
For Legacy Projects (
net461
):-
Target Folders:
-
System Mode:
%ProgramFiles%\UiPath\Studio\net461\Rules
-
User Mode:
%LocalAppData%\Programs\UiPath\Studio\net461\Rules
-
System Mode:
-
DLL to Install:
- Prepare to install the
.dll
file fornet461
:C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net461\HelloWorld.WorkflowAnalyzerRules.dll
- Prepare to install the
-
-
For Windows Projects (
net6.0
):-
Target Folders:
-
System Mode:
%ProgramFiles%\UiPath\Studio\Rules\net6.0
-
User Mode:
%LocalAppData%\Programs\UiPath\Studio\Rules\net6.0
-
System Mode:
-
DLL to Install:
- Prepare to install the
.dll
file fornet6.0
:C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net6.0\HelloWorld.WorkflowAnalyzerRules.dll
- Prepare to install the
-
For UiPath Studio versions before 2021.10:
-
For Legacy Projects (
net461
):-
Target Folders:
-
System Mode:
%ProgramFiles%\UiPath\Studio\Rules
-
User Mode:
%LocalAppData%\Programs\UiPath\Studio\Rules
-
System Mode:
-
DLL to Install:
- Prepare to install the
.dll
file fornet461
:C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net461\HelloWorld.WorkflowAnalyzerRules.dll
- Prepare to install the
-
After identifying your version, mode, and project type, copy the correct .dll
file to the appropriate folder:
- For UiPath Studio Version ≥ 2024.10:
-
System Mode:
Copy the
.dll
file- from
C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net8.0\HelloWorld.WorkflowAnalyzerRules.dll
- to
%ProgramFiles%\UiPath\Studio\Rules\net8.0
.
- from
-
User Mode:
Copy the
.dll
file- from
C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net8.0\HelloWorld.WorkflowAnalyzerRules.dll
- to
%LocalAppData%\Programs\UiPath\Studio\Rules\net8.0
.
- from
- For UiPath Studio Version 2021.10 - 2024.9:
-
For
net461
(Legacy Project):-
System Mode:
Copy the
.dll
- from
C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net461\HelloWorld.WorkflowAnalyzerRules.dll
- to
%ProgramFiles%\UiPath\Studio\net461\Rules
.
- from
-
User Mode:
Copy the
.dll
- from
C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net461\HelloWorld.WorkflowAnalyzerRules.dll
- to
%LocalAppData%\Programs\UiPath\Studio\net461\Rules
.
- from
-
System Mode:
Copy the
-
For
net6.0
(Windows Project):-
System Mode:
Copy the
.dll
- from
C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net6.0\HelloWorld.WorkflowAnalyzerRules.dll
- to
%ProgramFiles%\UiPath\Studio\Rules\net6.0
.
- from
-
User Mode:
Copy the
.dll
- from
C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\net6.0\HelloWorld.WorkflowAnalyzerRules.dll
- to
%LocalAppData%\Programs\UiPath\Studio\Rules\net6.0
.
- from
-
System Mode:
Copy the
- Open UiPath Studio.
- Open a project for each project type "legacy" and "Windows".
- Open the Workflow Analyzer to verify that the custom rules are visible. Expected behavior is: HWR-SAMPLE-001 is shown in the Workflow Analyzer.
- If the custom rules are detected in UiPath Studio, the development environment is set up for own custom rules development.
To ensure your custom UiPath Studio Workflow Analyzer rules nupkg
package is correctly detected, follow these steps. As the nupkg
package contains dll files for all targetFrameworks, it is not necessary to deploy the dll files separately. The deployment process only requires one nupkg
package to be deployed.
The custom rules need to be packaged into a NuGet package, which can be consumed by UiPath Studio. To do this:
- Publish the NuGet Package Locally:
To make the custom rules available for UiPath Studio, the next step is to publish the
.nupkg
file to a local or networked NuGet feed. You can do this by creating a local NuGet feed and pointing UiPath Studio to it. - Use the
nupkg
package:C:\Users\<username>\Source\Repos\github.com\rpapub\WatchfulAnvil\src\HelloWorld.WorkflowAnalyzerRules\bin\Debug\HelloWorld.WorkflowAnalyzerRules.0.1.0-alpha.nupkg
Once the custom rules are packaged into a NuGet file and the feed is created, the next step is to configure UiPath Studio to access this local feed.
- Open UiPath Studio.
- Navigate to Manage Packages under the Home tab.
- In the Package Manager, go to the Settings tab.
- Click the + icon to add a new package source.
- Set the Name to something descriptive (e.g.,
Local Custom Rules
) and point the Source to the folder where your.nupkg
file is located (e.g.,C:\LocalNuGetFeed
).
After setting up the package feed:
- Open the Manage Packages window again in UiPath Studio.
- Under the Available Packages tab, select the Local Custom Rules feed.
- Search for your custom rule package (e.g.,
HelloWorld.WorkflowAnalyzerRules
), then click Install. - The custom rules will now be available for use in UiPath Studio.
To verify that the custom rules are detected and applied correctly in UiPath Studio:
- Open UiPath Studio.
- Open a project for each project type "legacy" and "Windows".
- Open the Workflow Analyzer to verify that the custom rules are visible.
- If the custom rules are detected in UiPath Studio, the development environment is set up for own custom rules development.