Setting up defaultRunDotNetScriptReferences
When a migrated PAD flow contains .NET scripts, PAD requires the referenced assemblies to be explicitly declared. Blueprint uses the %defaultRunDotNetScriptReferences% variable in Init_Variables to point PAD to the correct assembly location.
β If you're resolving a specific missing assembly β for AsEnumerable Supportο»Ώ or XmlDocument Supportο»Ώ β see those articles for targeted steps. This article covers the general setup.
Recommended Setup: Install the .NET Developer Pack
Installing the full .NET developer pack is the most robust approach. It covers all assembly references your migrated flows may need β now and in future migrations.
Download the .NET 4.7.2 Developer Pack from Microsoft.
Run the installer β assemblies are installed to C:\Program Files (x86)\Reference Assemblies.
In that folder, delete or move the System.EnterpriseServices files β PAD cannot load these and will throw a runtime error if they are present.
In Init_Variables, set %defaultRunDotNetScriptReferences% to: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2
In Init_Variables, set %defaultRunDotNetScriptImports% to include whichever namespaces your scripts require.
Understanding Blueprint-Generated .NET Scripts
Blueprint generates custom .NET scripts during migration to replicate UiPath functionality that has no direct PAD equivalent. Common cases include:
- Complex string manipulation
- Advanced data structure handling
- Screenshot or image processing
- Custom logic blocks
Each generated script includes a description comment at the top identifying its purpose, the original UiPath activity it replaces, and its required input/output variables.
Example:
Review these descriptions to understand each script's role before modifying any logic.
Automatic Namespace Assignment (v8.3+)
Blueprint automatically assigns the required .NET namespaces to %defaultRunDotNetScriptImports% per XAML file during migration. Each migrated file receives only the namespaces its scripts actually use β reducing manual configuration and the risk of missing imports at runtime.
Example:
This value varies per XAML file depending on script content. You no longer need to define all namespaces globally.