-
Notifications
You must be signed in to change notification settings - Fork 0
Execution Assembly
.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.
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:
- Build a command assembly.
- Add its folder to RevitDevTool settings.
- Let the command tree discover the assembly.
- Run the command from the panel or command browser.
| 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.
Current samples:
Samples/CSharpDemo/
Samples/AcadCSharpDemo/
Samples/McpToolsetDemo/
Samples/RevitMcpToolSet/
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.
- Run Code Overview
- Modern Python Scripting
- Python Debugging
- Python Ecosystems
- RevitDevTool And pyRevit
- Python Stub Generation
- Run .NET Add-ins
- Scripting Runtimes