---
title: Setting up defaultRunDotNetScriptReferences
slug: blueprint/setting-up-defaultrundotnetscriptreferences
docTags: yO7XZ9PJxDCKZ-Mf4TSYB
createdAt: 2026-04-17T18:28:53.239Z
---

:::CtaButton{label="🟢 Migrator" openInNewTab="false"}

:::

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.

:::hint{type="info"}
ⓘ If you're resolving a specific missing assembly — for [AsEnumerable Support](docId\:E__1hmko5sslwVynCZBA8) or [XmlDocument Support](docId\:KLextgqIxEKAx-0E-BOeF) — 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.

::::WorkflowBlock
:::WorkflowBlockItem
Download the .NET 4.7.2 Developer Pack from Microsoft.
:::

:::WorkflowBlockItem
Run the installer — assemblies are installed to C:\Program Files (x86)\Reference Assemblies.
:::

:::WorkflowBlockItem
In that folder, **delete or move** the **System.EnterpriseServices** files — PAD cannot load these and will throw a runtime error if they are present.
:::

:::WorkflowBlockItem
In **Init\_Variables**, set %defaultRunDotNetScriptReferences% to:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\\.NETFramework\v4.7.2
:::

:::WorkflowBlockItem
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:**

:::BlockQuote
// Description: This script replicates the behavior of UiPath's "Take Screenshot" activity.// Inputs: windowHandle// Output: imagePath
:::

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:**

:::BlockQuote
// %defaultRunDotNetScriptImports% =// System,// System.Linq,// System.Collections.Generic
:::

This value varies per XAML file depending on script content. You no longer need to define all namespaces globally.
