Skip to content
Skills Library
Programming · Building & coding

revit-assembly-resolution

/revit-assembly-resolution

Redirect Autodesk Revit add-in assembly resolution to a plugin folder with Nice3point.Revit.Toolkit. USE FOR: fixing a FileNotFoundException when loading a WPF window or third-party dependency Revit cannot resolve, or pinning which folder a bounded load resolves from. DO NOT USE FOR: entry points derived from the Toolkit base classes (ExternalCommand, ExternalApplication, ExternalDBApplication), or preventing two add-ins' dependency versions from colliding process-wide (use revit-dependency-isolation).

Licence
MIT
Last repository change
08.10.2026

Assessment and security

98/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene13 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 08.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Redirect Autodesk Revit add-in assembly resolution to a plugin folder with Nice3point.Revit.Toolkit. USE FOR: fixing a FileNotFoundException when loading a WPF window or third-party dependency Revit cannot resolve, or pinning which folder a bounded load resolves from. DO NOT USE FOR: entry points derived from the Toolkit base classes (ExternalCommand, ExternalApplication, ExternalDBApplication), or preventing two add-ins' dependency versions from colliding process-wide (use revit-dependency-isolation).

Original author description

Redirect Autodesk Revit add-in assembly resolution to a plugin folder with Nice3point.Revit.Toolkit. USE FOR: fixing a FileNotFoundException when loading a WPF window or third-party dependency Revit cannot resolve, or pinning which folder a bounded load resolves from. DO NOT USE FOR: entry points derived from the Toolkit base classes (ExternalCommand, ExternalApplication, ExternalDBApplication), or preventing two add-ins' dependency versions from colliding process-wide (use revit-dependency-isolation).

How it works

  1. When to use
  2. When not to use
  3. Workflow
  4. Validation
  5. Common Pitfalls
Original SKILL.md headings · 61 lines, 332 words
SKILL.md preview
---
name: revit-assembly-resolution
description: >
  Redirect Autodesk Revit add-in assembly resolution to a plugin folder with Nice3point.Revit.Toolkit.
  USE FOR: fixing a FileNotFoundException when loading a WPF window or third-party dependency Revit cannot resolve, or pinning which folder a bounded load resolves from.
  DO NOT USE FOR: entry points derived from the Toolkit base classes (ExternalCommand, ExternalApplication, ExternalDBApplication), or preventing two add-ins' dependency versions from colliding process-wide (use revit-dependency-isolation).
license: MIT
---

# Revit Assembly Resolution

Revit does not probe an add-in's folder for dependencies; loading a window or third-party assembly can throw `FileNotFoundException`.
`ResolveHelper` (from `Nice3point.Revit.Toolkit`) redirects resolution to a type-adjacent or explicit folder for the scope's lifetime.
Scopes nest — the innermost is searched first.

## When to use

- A dependency or WPF window fails to load with a resolution error.
- Isolating a conflicting assembly version for a bounded operation.

## When not to use

- Inside an entry point derived from the Toolkit base classes (`ExternalCommand`, `AsyncExternalCommand`, `ExternalApplication`, `ExternalDBApplication`) — they already open a resolve scope; a manual one is redundant.
- Preventing two add-ins from loading conflicting versions of the same dependency process-wide — that is `revit-dependency-isolation`.

## Workflow

### Step 1: Wrap the load in a resolve scope

```csharp
using (ResolveHelper.BeginAssemblyResolveScope<Application>())
{
    var window = new SettingsWindow();
    window.Show();
}
```

The generic and `typeof(...)` overloads probe the folder of the given type's assembly.
Pass an explicit directory when the dependencies are located in another folder, such as a shared or external libraries folder:

```csharp
using (ResolveHelper.BeginAssemblyResolveScope(@"C:\Libraries"))
{
    return LoadExternalLibrary();
}
```

### Step 2: Scope it tightly and nest for isolation

Open the scope only around the load that needs it, and nest scopes when a dependency version must be isolated from an outer one.

### Step 3: Verify

Confirm the dependency loads without a resolution error, and that resolution behavior is restored after the scope disposes.

## Validation

- [ ] The scope wraps the specific load that fails to resolve.
- [ ] Entry points rely on the base classes, not a manual scope.
- [ ] The scope disposes, restoring normal resolution.

## Common Pitfalls

| Pitfall                                                          | Correct approach                                          |
|------------------------------------------------------------------|-----------------------------------------------------------|
| A hand-written `AppDomain.CurrentDomain.AssemblyResolve` handler | Use `ResolveHelper.BeginAssemblyResolveScope`.            |
| Adding a scope inside a Toolkit entry point                      | Remove it; the base class already opens a resolve scope.  |
| `ResolveHelper` not found                                        | The `Nice3point.Revit.Toolkit` package is not referenced. |

Versions

The database has no other skills named revit-assembly-resolution.

Database snapshot: 13.11.2026 · package version 02614f2ba47b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100revit-dependency-isolation
    Prevent Autodesk Revit add-in dependency conflicts with AssemblyLoadContext isolation (Revit 2027+) or ILRepack repacking (legacy). USE FOR: resolving crashes caused by two add-ins loading different versions of the same dependency, by isolating the add-in's assemblies. DO NOT…
  • 98revit-api-references
    Reference the Autodesk Revit API assemblies using the Nice3point.Revit.Api.* or Nice3point toolkit, extensions or other NuGet packages. USE FOR: adding a Revit API assembly reference. DO NOT USE FOR: the version matrix and conditional compilation (use revit-multi-version-configuration).
  • 90revit-ai-test-automation
    指导 AI 编码助手为 Windows 上的 Revit 二次开发建立并尽可能自动完成测试,涵盖场景设计、测试代码生成、构建、模型副本执行、结果诊断和回归验证。使用 PowerShell 与 Revit API,适用于插件测试框架搭建和业务回归;界面与正式命令入口按实际工具能力追加验证。
  • 90revit-bim
    Revit BIM expertise for all building professionals. Use when the user asks to design a building, create walls, add floors, place columns, route MEP systems, create structural framing, add dimensions, tag elements, create sheets, export drawings, query the model, analyze…
  • 84developing-wpf-customcontrols
    Develops WPF CustomControls using Parts and States Model best practices. Use when creating templatable controls with TemplatePart, TemplateVisualState, OnApplyTemplate, or VisualStateManager.
  • 98open-point-cloud
    Link a PLY or E57 point cloud into a Revit model with the Open Point Cloud add-in, from an agent or a script. Use it when a user asks to link, import or check a PLY or E57 point cloud in Revit.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.