Skip to content

Execution Assembly

Truong Giang Vu edited this page May 31, 2026 · 1 revision

.NET Assembly Execution

.NET assembly execution is for compiled add-ins and commands.

Use it when you are developing a compiled command and want to run it from RevitDevTool during iteration.

In Revit, this fills the same practical role as Revit Add-In Manager: build a command assembly, load it, and run commands without packaging a full add-in workflow each time. For many development workflows, RevitDevTool can replace Add-In Manager while also giving you the surrounding logging, scripting, visualization, and tool workflow.

Assembly Execution

In Revit, assembly execution is centered around Revit command contracts such as IExternalCommand. In other hosts, the same idea applies to that host's command/tool assembly model.

Typical workflow:

  1. Build a command assembly.
  2. Add its folder to RevitDevTool settings.
  3. Let the command tree discover the assembly.
  4. Run the command from the panel or command browser.

Version Notes

Autodesk version Runtime behavior
2022-2024 .NET Framework / net48; no unloadable AssemblyLoadContext
2025-2026 .NET 8; unloadable AssemblyLoadContext can be used
2027 .NET 10; follows modern .NET path

The legacy .NET Framework path needs extra care around assembly loading and unmanaged DLL resolution.

Samples

Current samples:

Samples/CSharpDemo/
Samples/AcadCSharpDemo/
Samples/McpToolsetDemo/
Samples/RevitMcpToolSet/

User Guidance

When building external assemblies:

  • target the correct Autodesk year/runtime;
  • keep host API references aligned with the target year;
  • test against the actual host when command behavior depends on host API context.

For build commands, see Build From Source.

Clone this wiki locally