Skip to content

Revise AnalysisLevel note for correctness #29054

@Youssef1313

Description

@Youssef1313

https://github.com/dotnet/sdk/blob/7347d27e2fc7a25de75e00083d379660dca87689/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Analyzers.targets#L18-L27

It looks like, for .NET 5, the default value is 5.0, but for any newer version, the default is latest.

The documentation says:

The default value for the AnalysisLevel property is latest, which means you always get the latest code analysis rules as you move to newer versions of the .NET SDK.

which seems to apply only for .NET 6 and greater.

@mavasani Can you confirm?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions