Skip to content

Consider enabling EnforceCodeStyleInBuild in runtime to validate IDE rules on build #94658

Description

@ViktorHofer

See https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview?tabs=net-7#enable-on-build

IDEXXXX rules aren't validated in a dotnet build. Should we enable that validation by setting the EnforceCodeStyleInBuild property?

As an example, license headers aren't validated outside of a design time build inside VS:

# IDE0073: The file header is missing or not located at the top of the file
dotnet_diagnostic.IDE0073.severity = warning

Related:

@stephentoub @akoeplinger

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions