Microsoft Visual Studio Community 2022 (64-bit) - Preview
Version: 17.14.3 Preview 1.0
If you place square brackets with a non-existent attribute (e.g., [crash]) after an if statement without a valid expression, all Roslyn code analyzers crash and stop working.
Conditions required:
- Use of { }
- A non-existent attribute (e.g. [crash]) on a new line after if
- Presence of else
Minimal code to reproduce:
{
if (devsBad)
// [crash]
else return;
}
To trigger the issue, just uncomment the line // [crash] .
Once uncommented, many Roslyn analyzers will stop functioning.
Affected analyzers (full list):
analizers.txt
Screenshots:

