-
Notifications
You must be signed in to change notification settings - Fork 481
Closed
Labels
BugThe product is not behaving according to its current intended designThe product is not behaving according to its current intended designPriority:0Critical to the releaseCritical to the releaseReliabilityIndicates a reliability issue (crash/data loss/test flakiness)Indicates a reliability issue (crash/data loss/test flakiness)Urgency-Soon
Milestone
Description
Just bumped my project to .NET 7.0 RC2 (running VS Version 17.4.0 Preview 6.0), and realized that all code analysis rules are disabled, no matter the settings. Downgrading the project to net6.0 re-enables all CAxxxx rules.
Steps To Reproduce
Just create a console project with some CAxxxx violations, and target net7.0. No warnings are produced. Downgrade to net6.0 to get the warnings back.
<PropertyGroup>
<!--TargetFramework>net6.0</TargetFramework-->
<TargetFramework>net7.0</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<WarningLevel>9999</WarningLevel>
</PropertyGroup>Expected behavior
CAxxxx rules are checked when targeting .NET 7.
Actual behavior
CAxxxx rules are checked only when targeting .NET 6 or earlier.
Metadata
Metadata
Assignees
Labels
BugThe product is not behaving according to its current intended designThe product is not behaving according to its current intended designPriority:0Critical to the releaseCritical to the releaseReliabilityIndicates a reliability issue (crash/data loss/test flakiness)Indicates a reliability issue (crash/data loss/test flakiness)Urgency-Soon