Skip to content

Exception in VS 2019 when setting analyzer rule severity level. #45446

@GaTechThomas

Description

@GaTechThomas

Version Used:
Microsoft (R) Visual C# Compiler version 3.6.0-4.20251.5 (910223b)

Steps to Reproduce:

  1. Add CA rules to .editorconfig file
  2. Add line "# dotnet_diagnostic.severity = error" to the .editorconfig file
  3. Run code analysis in Visual Studio 2019 IDE (will need at least one analyzer rule failure)
  4. In the Error List, right click on a rule failure and set severity for the rule to a different severity level

Expected Behavior:
New rule entry is added to .editorconfig file.

Actual Behavior:
Dialog box error as follows, and no change to the .editorconfig file:

. ---------------------------
. Microsoft Visual Studio
. ---------------------------
. Length cannot be less than zero.
.
. Parameter name: length
. ---------------------------
. OK
. ---------------------------

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions