Skip to content

CS8019 doesn't work during compilation #22579

@davidrea-MS

Description

@davidrea-MS

Version Used: VS 2017 15.3.5

Steps to Reproduce:

  1. Create new Class Library (.NET Framework) project.
  2. Edit Active Rule Set and make CS8019 (Unnecessary using directive) an 'Error'.
  3. Compile project.

Expected Behavior:
Given that the project starts with a Class1.cs file containing unused using directives, compilation should fail.

Actual Behavior:
Compilation succeeds. The VS UI does show the IntelliSense error, however.

Attached repro project.
AnalyzerTest.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions