- Solution:
RevitDevTool.slnx. - Build pipeline:
build/Program.csandbuild/Modules/*. - Required SDK: .NET
10.0.0fromglobal.json.
| Autodesk year | Configuration suffix | Target framework |
|---|---|---|
| 2022 | Autodesk.2022 |
net48 |
| 2023 | Autodesk.2023 |
net48 |
| 2024 | Autodesk.2024 |
net48 |
| 2025 | Autodesk.2025 |
net8.0-windows |
| 2026 | Autodesk.2026 |
net8.0-windows |
| 2027 | Autodesk.2027 |
net10.0-windows |
Valid modes are Debug and Release, so full names look like Debug.Autodesk.2025.
Host #if symbols are generated in props/Revit.targets and props/AutoCad.targets
from SupportedRevitVersion / SupportedAutoCadVersion (2022–2032 listed;
future years are no-ops until Directory.Build.props sets that year).
Building year Y defines REVIT / AUTOCAD, REVIT{Y} / AUTOCAD{Y}, and
{HOST}{year}_OR_GREATER for each listed year from the minimal (default 2022)
through Y. Override RevitVersionMinimal / AutoCadVersionMinimal, or set
DisableImplicitRevitDefines / DisableImplicitAutoCadDefines to skip.
- Focused host compile:
scripts/build-host.ps1 -Year 2025. - Installer / bundle:
scripts/pack.ps1(build/Modules/*,PublishRelease.yml). - TestAdapter NuGet:
scripts/pack-test-adapter.ps1(PublishTestAdapter.yml). Not part ofbuild/Modules/*. Seedocs/architecture/Testing/README.md. - Build pipeline with no args:
dotnet run --project buildcompiles all release configurations + publishes DevTools.Daemon and DevTools.TestRunner.
DevTools.Daemon is a standalone MewUI tray application (DevTools.Daemon.exe) that runs outside host processes. It bridges AI clients (Claude Desktop, Cursor) with host applications via named pipes, handles authentication, and manages multi-machine gateway connectivity.
The csproj has a DeployDevToolsDaemon MSBuild target (AfterTargets="Publish") that:
- Kills any running
DevTools.Daemon.exeprocess (file lock prevention) - Copies the published single-file executable to
%AppData%\Autodesk\ApplicationPlugins\RevitDevTool.bundle\Contents\
# Publish Daemon (triggers deploy automatically)
dotnet publish source/DevTools.Daemon -c Release- Target:
net10.0-windows/win-x64 - Framework-dependent single-file (requires .NET 10 runtime)
- MewUI tray app with embedded
appsettings.json(CI/CD injects secrets) - Properties:
PublishSingleFile=true,SelfContained=false
| Command | Daemon / Runner behavior |
|---|---|
dotnet run --project build (no args) |
PublishDaemonModule + PublishTestRunnerModule publish + deploy to AppData Contents |
dotnet run --project build -- pack |
Same + CreateBundleModule packs both exes into bundle zip |
dotnet publish source/DevTools.Daemon -c Release |
Direct Daemon publish + deploy (csproj target) |
dotnet publish source/DevTools.TestRunner -c Release |
Direct Runner publish + deploy (csproj target) |
DevTools.TestRunner is the host-test CLI (DevTools.TestRunner.exe). It locates/reuses Revit or AutoCAD pipes and is installed beside Daemon under bundle Contents\.
The csproj has a DeployDevToolsTestRunner MSBuild target (AfterTargets="Publish") that kills a running Runner process (file lock) and copies the single-file exe to %AppData%\Autodesk\ApplicationPlugins\RevitDevTool.bundle\Contents\.
dotnet publish source/DevTools.TestRunner -c Release- Target:
net10.0-windows/win-x64 - Self-contained single-file
- Properties:
PublishSingleFile=true,SelfContained=true
Running Revit or AutoCAD locks loaded DLLs. Any build that deploys to the addin folder will fail or produce stale results if the host is still running.
If the target host is running, stop only that exact year:
scripts/kill-host.ps1 -HostApp Revit -Year 2025
scripts/kill-host.ps1 -HostApp AutoCAD -Year 2025The script intentionally has no "all versions" mode. Other Revit/AutoCAD years must remain running.
This applies to:
scripts/build-host.ps1(MSBuildDeployRevitAddin/DeployAutoCadBundletarget deploys after build)scripts/pack.ps1dotnet buildon aUseRevit/UseAutoCadproject without compile-only-p:Deploy*=false
NOT needed when:
- Building shared
DevTools.*(no deploy targets imported), or - Building a host project with
-p:DeployRevitAddin=false -p:DeployAutoCadBundle=false -p:ILRepackable=false(compile-only)
Do not cargo-cult those -p flags onto every dotnet build. See .agents/skills/build/SKILL.md.
ILRepack lives in props/ILRepack.targets (imported for every project). Opt in
with ILRepackable=true and list loose DLLs in RepackBinariesExcludes. The
driver adds the ILRepack PackageReference when that flag is true. Policy for
/union, Polyfill, and isolated ALC:
0019.
DevTools.TestAdapter opts in the same way (ILRepackable on every TFM,
RepackBinariesKeep for DevTools.Testing.Abstractions.dll); consumers of
RevitDevTool.TestAdapter do not.
Scintilla5.NET 7 natives stay under runtimes/win-x64/native/ (not output root).
DevTools.Logging has a direct Scintilla5.NET PackageReference so
build/scintilla5.net.targets copies them (needed on net48). Common.props
then drops win-x86 / win-arm64 on every TFM after CopyFilesToOutputDirectory.
Any shared DevTools.* change can affect all target frameworks. Polyfill covers
missing BCL APIs on every TFM (ThrowIfNull via PolyArgumentExceptions). After
edits, compile via .agents/skills/build/SKILL.md (multi-TFM Debug, or Autodesk
2022/2025/2027 for host API projects). Avoid newer BCL APIs only when compile
fails and no Polyfill/helper exists.
Agents run dotnet build on touched projects per the build skill: shared
libraries without deploy props; host UseRevit/UseAutoCad projects with
deploy/ILRepack off for compile-only proof. Spot-check 2022 / 2025 / 2027
for host API projects when TFM-sensitive. Full command reference: verification.md.