✈ Pre-Flight checks
🐞 Describe the bug
When launching Revit 2026.4 with pyRevit plugin 6.3.0 attached via master clone,
the pyRevit ribbon tab fails to load. All extensions (pyRevitCore, pyRevitTools)
throw System.IO.FileNotFoundException for System.Collections.Immutable, Version=9.0.0.0, even though the DLL exists on disk with that exact assembly
version.
Root cause identified
This is NOT a missing DLL, probing path, or binding redirect issue. It is a
side-by-side assembly conflict in the default AssemblyLoadContext of CoreCLR
(Revit 2026 runs on .NET 8 CoreCLR, not .NET Framework).
- Revit 2026.4 preloads on startup:
System.Collections.Immutable 8.0.0.0 (from Microsoft.NETCore.App 8.0)
Microsoft.Extensions.DependencyInjection 8.0.0.0
- pyRevit master clone ships with
Microsoft.CodeAnalysis 5.3.0.0 which
hard-requires System.Collections.Immutable 9.0.0.0.
- CoreCLR's default ALC refuses to load 9.0.0 when 8.0.0 is already loaded —
this would produce distinct type identities for the same type, violating
ALC invariants.
- Roslyn fails to initialize → pyRevit shows the WPF error dialog.
Key journal evidence (Revit journal, line 1189):
Addin's module System.Collections.Immutable of version 9.0.0.0 conflicts with same preloaded module of version 8.0.0.0
Secondary finding (line 1274): the master clone was compiled against RevitAPI
25.4.20.0, but the installed Revit is 26.4.0.0 — SDK mismatch indicating the
master branch is in a transitional state.
Additional broken dependency in CLI: Could not load DocoptNet 0.8.3.0.
Attempted workarounds (none worked)
- Copying
System.Collections.Immutable.dll from .NET 9.0.15 runtime to
pyRevit-Master/bin/ and pyRevit-Master/site-packages/.
pyrevit caches clear --all.
- Installing multiple .NET Desktop runtimes (8.0.23, 9.0.10, 9.0.15, 10.0.2).
- Reattaching clone with
pyrevit attach default.
Binding redirect (classic .NET Framework fix) is not applicable because
CoreCLR does not use Fusion-style binding redirects.
Suggested direction for upstream fix
Not prescriptive — the team decides. Possible paths:
- Downgrade
Microsoft.CodeAnalysis in master to a version compatible with
System.Collections.Immutable 8.0.0 (to align with Revit 2026's preload).
- Load Roslyn dependencies in an isolated
AssemblyLoadContext, avoiding
collision with Revit's default ALC.
- Bundle the full .NET 9 runtime alongside pyRevit if option 2 is infeasible.
⌨ Error/Debug Message
ERROR [pyrevit.loader.sessionmgr] Error building/loading extension 'pyRevitCore':
System.IO.FileNotFoundException: Could not load file or assembly
'System.Collections.Immutable, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Collections.Immutable, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'
at pyRevitAssemblyBuilder.AssemblyMaker.AssemblyBuilderService.BuildWithRoslyn(...)
at pyRevitAssemblyBuilder.AssemblyMaker.AssemblyBuilderService.BuildExtensionAssembly(...)
at pyRevitAssemblyBuilder.SessionManager.SessionManagerService.LoadSession()
ERROR [pyrevit.loader.sessionmgr] Error building/loading extension 'pyRevitTools':
[identical error]
WARNING [pyrevit.loader.sessionmgr] No pyRevit assemblies found
♻️ To Reproduce
- Install Revit 2026.4 (current shipping release, build 26.0.4.409).
- Install pyRevit plugin 6.3.0 and CLI 6.4.0 from the official installers.
pyrevit attach default <master-clone> 2026 (or the equivalent
manifest pointing the addin to the master clone's pyRevitLoader.dll).
- Launch Revit 2026.4 and load any project (an empty document is
sufficient — the failure occurs at addin initialization, not at
project-content level).
- Observe the WPF "pyRevit" error dialog at startup.
⏲️ Expected behavior
The pyRevit ribbon tab loads cleanly when opening any project in
Revit 2026.4, exposing the standard pyRevitTools / pyRevitCore commands.
🖥️ Hardware and Software Setup (please complete the following information)
`pyrevit env` FAILS with a similar dependency loading error
(relevant to this issue — demonstrates the master clone's broken
dependency chain is not limited to the Revit runtime):
$ pyrevit env
Unhandled exception. System.IO.FileNotFoundException: Could not
load file or assembly 'DocoptNet, Version=0.8.3.0, Culture=neutral,
PublicKeyToken=7a38c71da49a547e'. El sistema no puede encontrar el
archivo especificado.
File name: 'DocoptNet, Version=0.8.3.0, Culture=neutral,
PublicKeyToken=7a38c71da49a547e'
at pyRevitCLI.PyRevitCLI.Main(String[] args)
Manual environment summary:
- Revit: 2026.4 (First Customer Ship, Build 26.0.4.409, 20250227_1515 x64)
- pyRevit plugin: 6.3.0
- pyRevit CLI: 6.4.0 (non-functional, see above)
- Clone: master (default attach)
- Engine: DEFAULT (2712)
- OS: Windows 11 24H2 (Build 10.0.26200.0)
- .NET runtimes installed:
Microsoft.AspNetCore.App 8.0.21
Microsoft.NETCore.App 8.0.23
Microsoft.NETCore.App 9.0.10
Microsoft.NETCore.App 9.0.15
Microsoft.NETCore.App 10.0.2
Microsoft.WindowsDesktop.App 8.0.23
Microsoft.WindowsDesktop.App 9.0.15
Microsoft.WindowsDesktop.App 10.0.2
Additional context
Project: NEXTIA (Ciudad Juárez, México) — building an MCP server that
bridges Claude (LLM client) with Revit 2026 via pyRevit Routes for
structural modeling automation. The bridge has its client side fully
built and unit-tested (60 mocked tests green); only the Routes
integration is blocked by this bug.
Happy to test candidate builds, patches, or instrumented WIP versions
against my Revit 2026.4 installation, and to share additional
diagnostic data (full journal, dependency walks, etc.) if useful.
Thanks to the pyRevit team for the considerable work already invested
in supporting Revit 2026 — the fact that the addin almost loads
cleanly indicates most of the heavy lifting is done.
✈ Pre-Flight checks
🐞 Describe the bug
When launching Revit 2026.4 with pyRevit plugin 6.3.0 attached via master clone,
the pyRevit ribbon tab fails to load. All extensions (pyRevitCore, pyRevitTools)
throw
System.IO.FileNotFoundExceptionforSystem.Collections.Immutable, Version=9.0.0.0, even though the DLL exists on disk with that exact assemblyversion.
Root cause identified
This is NOT a missing DLL, probing path, or binding redirect issue. It is a
side-by-side assembly conflict in the default AssemblyLoadContext of CoreCLR
(Revit 2026 runs on .NET 8 CoreCLR, not .NET Framework).
System.Collections.Immutable 8.0.0.0(from Microsoft.NETCore.App 8.0)Microsoft.Extensions.DependencyInjection 8.0.0.0Microsoft.CodeAnalysis 5.3.0.0whichhard-requires
System.Collections.Immutable 9.0.0.0.this would produce distinct type identities for the same type, violating
ALC invariants.
Key journal evidence (Revit journal, line 1189):
Secondary finding (line 1274): the master clone was compiled against RevitAPI
25.4.20.0, but the installed Revit is 26.4.0.0 — SDK mismatch indicating the
master branch is in a transitional state.
Additional broken dependency in CLI:
Could not load DocoptNet 0.8.3.0.Attempted workarounds (none worked)
System.Collections.Immutable.dllfrom .NET 9.0.15 runtime topyRevit-Master/bin/andpyRevit-Master/site-packages/.pyrevit caches clear --all.pyrevit attach default.Binding redirect (classic .NET Framework fix) is not applicable because
CoreCLR does not use Fusion-style binding redirects.
Suggested direction for upstream fix
Not prescriptive — the team decides. Possible paths:
Microsoft.CodeAnalysisin master to a version compatible withSystem.Collections.Immutable 8.0.0(to align with Revit 2026's preload).AssemblyLoadContext, avoidingcollision with Revit's default ALC.
⌨ Error/Debug Message
♻️ To Reproduce
pyrevit attach default <master-clone> 2026(or the equivalentmanifest pointing the addin to the master clone's
pyRevitLoader.dll).sufficient — the failure occurs at addin initialization, not at
project-content level).
⏲️ Expected behavior
The pyRevit ribbon tab loads cleanly when opening any project in
Revit 2026.4, exposing the standard pyRevitTools / pyRevitCore commands.
🖥️ Hardware and Software Setup (please complete the following information)
Additional context
Project: NEXTIA (Ciudad Juárez, México) — building an MCP server that
bridges Claude (LLM client) with Revit 2026 via pyRevit Routes for
structural modeling automation. The bridge has its client side fully
built and unit-tested (60 mocked tests green); only the Routes
integration is blocked by this bug.
Happy to test candidate builds, patches, or instrumented WIP versions
against my Revit 2026.4 installation, and to share additional
diagnostic data (full journal, dependency walks, etc.) if useful.
Thanks to the pyRevit team for the considerable work already invested
in supporting Revit 2026 — the fact that the addin almost loads
cleanly indicates most of the heavy lifting is done.