You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Harmless debug assert hit in Uri's DebugAssertInCtor #124659
// Uri.CreateThisFromUri fires Debug.Assert: (_flags & Flags.Debug_LeftConstructor) == 0// when combining a UNC file URI base with a "file:" relative URI.//// Source: System.Uri.DebugAssertInCtor() at Uri.cs:205// System.Uri.CreateThisFromUri() at UriExt.cs:891varbaseUri=newUri(@"\\aa",UriKind.Absolute);// parses as file://aa/varrelUri=newUri("file:",UriKind.Relative);_=newUri(baseUri,relUri);// Debug.Assert failure
The assert violation is in CreateThisFromUri — it expects the constructor flag Debug_LeftConstructor to not be set, but the re-entrant URI construction from a UNC base + file: relative violates this invariant.
This is from the extra DebugAssertInCtor I added to DebugSetLeftCtor in #123932. We should either remove the assert or avoid copying the Debug_LeftConstructor flag in CreateThisFromUri.
Activity
dotnet-policy-service commentedon Feb 20, 2026
Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.