System.Diagnostics.DiagnosticSource version conflict between Revit and Azure.Identity / MSAL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
We ran into a nasty dependency conflict and wanted to share our findings in case others are hitting the same wall.
Revit (up to and including 2026) bundles System.Diagnostics.DiagnosticSource v4.0.1. Recent versions of Microsoft.Identity.Client (4.58+) require v6.0+, because v6.0 introduced a new Meter class that MSAL now depends on.
The chain of dependencies is:
- Azure.Identity → depends on Microsoft.Identity.Client
- Microsoft.Identity.Client 4.58+ → requires System.Diagnostics.DiagnosticSource 6.0+
- Revit ships with System.Diagnostics.DiagnosticSource 4.0.1 → no Meter class → kaboom💥
The (ugly) workaround
We found that Microsoft.Identity.Client 4.57.0 is the last version that doesn't pull in DiagnosticSource 6.0+, and Azure.Identity 1.10.4 is the last version that ships with MSAL ≤ 4.57.
Pinning to those versions fixes the crash — but both are marked as Vulnerable and Deprecated on NuGet, which is obviously not something we want to ship with long-term.
So we're wondering;
- Has anyone found a cleaner workaround, e.g. assembly binding redirects or any other load-order trick that actually works in the Revit context?
- Has anyone heard from Autodesk on updating their bundled DiagnosticSource version?
We're curious whether this is already on their radar or if others have found a path forward. Any input appreciated!