You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version Used:
SDK 7.0.100 with Visual studio 17.4.1
Steps to Reproduce:
Install .NET6 SDK and .NET 7 SDK in parallel (latest versions)
Create a C# project with a global.json selecting .NET6
Use <AnalysisLevel>latest-all</AnalysisLevel> in csproj
Using some example code, targeting .NET48 with <EnableNETAnalyzers>true</EnableNETAnalyzers>
Verify the number of code analysis warnings. E.g. 97 warnings
Switch to .NET7 using global.json, rebuild
The number of code analysis warnings decreases to about the same number as with <AnalysisLevel>latest-recommended</AnalysisLevel>
Diagnostic Id:
For example, CA2007 should be enabled in "latest-all", but is not in .NET7
Expected Behavior:
In .NET7, at least the same number of code style warnings should be visible as in .NET 6.
Actual Behavior:
latest-all has not the same effect in .NET 7
Workaround
With this global.json, I can still use C#11 features (with VS17.4) and all analyzers are working:
{
"sdk": {
"allowPrerelease": false,
"version": "6.0.0",
"rollForward": "latestMinor"
}
}
The text was updated successfully, but these errors were encountered:
Version Used:
SDK 7.0.100 with Visual studio 17.4.1
Steps to Reproduce:
Diagnostic Id:
For example, CA2007 should be enabled in "latest-all", but is not in .NET7
Expected Behavior:
In .NET7, at least the same number of code style warnings should be visible as in .NET 6.
Actual Behavior:
latest-all has not the same effect in .NET 7
Workaround
With this global.json, I can still use C#11 features (with VS17.4) and all analyzers are working:
{
"sdk": {
"allowPrerelease": false,
"version": "6.0.0",
"rollForward": "latestMinor"
}
}
The text was updated successfully, but these errors were encountered: