Skip to content

Resolve ambiguous MiniProfilerExtensions reference#698

Open
leno23 wants to merge 1 commit into
MiniProfiler:mainfrom
leno23:fix/miniprofilerextensions-ambiguous-683
Open

Resolve ambiguous MiniProfilerExtensions reference#698
leno23 wants to merge 1 commit into
MiniProfiler:mainfrom
leno23:fix/miniprofilerextensions-ambiguous-683

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 25, 2026

Summary

  • MiniProfiler.Shared and MiniProfiler.AspNetCore both declared a MiniProfilerExtensions type in StackExchange.Profiling.
  • Referencing global::StackExchange.Profiling.MiniProfilerExtensions (for example from source generators) fails with CS0433 when both assemblies are referenced, such as via MiniProfiler.AspNetCore.Mvc.
  • Rename the ASP.NET Core extension holder to MiniProfilerAspNetCoreExtensions. Extension method usage such as profiler.RenderIncludes(...) is unchanged.

Fixes #683

Test plan

  • Build solution with MiniProfiler.AspNetCore.Mvc referenced
  • Confirm global::StackExchange.Profiling.MiniProfilerExtensions.Step(...) resolves without CS0433
  • Verify existing RenderIncludes extension method calls still compile

MiniProfiler.Shared and MiniProfiler.AspNetCore both defined a static
MiniProfilerExtensions class in StackExchange.Profiling, causing CS0433
when callers used the fully qualified type name (for example in source
generators).

Rename the ASP.NET Core extension holder to
MiniProfilerAspNetCoreExtensions. Extension method call sites are unchanged.

Fixes MiniProfiler#683

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ambiguous reference to StackExchange.Profiling.MiniProfilerExtensions

1 participant