mirror of
https://github.com/CommunityToolkit/dotnet.git
synced 2026-10-19 05:31:42 +08:00
02d81da64b
MSBuild PropertyGroup elements are evaluated top-to-bottom, with later assignments overwriting earlier ones. The >= 4.12 check was before the >= 4.3 check, so for any Roslyn version >= 4.12 (including 5.0), the 4.12 result would be immediately overwritten by the 4.3 match. This caused the wrong analyzer (roslyn4.3) to be selected instead of the correct one (roslyn4.12). Swap the order so the lower version (4.3) is checked first and the higher version (4.12) is checked last, ensuring the highest compatible analyzer wins. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>