Release 2025.0.1 · Nice3point/RevitToolkit (original) (raw)

Add-in dependency isolation

This release introduces an isolated plugin dependency container using .NET AssemblyLoadContext.
This feature allows plugins to run in a separate, isolated context, ensuring independent execution and preventing conflicts from incompatible library versions.
This enhancement is available for Revit 2025 and higher, addressing the limitations of Revit's traditional plugin loading mechanism, which loads plugins by path without native support for isolation.

изображение

How It Works:

The core functionality centers on AssemblyLoadContext, which creates an isolated container for each plugin.
When a plugin is loaded, it is assigned a unique AssemblyLoadContext instance, encapsulating the plugin and its dependencies to prevent interference with other plugins or the main application.

To use this isolation feature, developers must inherit their classes from:

These classes contain the built-in isolation mechanism under the hood.
Plugins using interfaces such as IExternalCommand will not benefit from this isolation and will run in the default context.

Limitations:

Improvements

Full changelog: 2025.0.0...2025.0.1