Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#85858·roslyn

Investigate preferred UI culture for analyzer-config diagnostics

Author: mwiemer-microsoftCreated Sep 30, 2026Updated Sep 30, 2026
LabelsArea-Compilers

AI-generated:

Version Used:

Roslyn PR #85776, xUnit v3 migration branch (commit 60d0ef48f9110d37108987b99ae32bbf6a1c8537).

Steps to Reproduce:

  1. Run the C# command-line compiler in-process with a non-English host UI culture.
  2. Supply /preferreduilang:en and an analyzer config containing an invalid diagnostic severity.
  3. Inspect the localized InvalidSeverityInAnalyzerConfig warning text.

Diagnostic Id:

InvalidSeverityInAnalyzerConfig

Expected Behavior:

The warning message should consistently follow the compiler's preferred UI language (/preferreduilang:en).

Actual Behavior:

The test infrastructure observed output matching either the preferred English resource or the host UI culture, and currently cannot explain which culture is used in all test-host configurations. The test is being pinned to en-US to avoid accepting two different outputs; investigate whether the compiler consistently applies PreferredUILang when formatting analyzer-config diagnostics or whether a culture-sensitive cache is involved.

Source: dotnet/roslyn

View original on GitHubView discussion on GitHub