Skip to content

Commit 9aec80a

Browse files
Copilotbaronfelakoeplinger
authored
Increment AnalysisLevel properties for .NET 11 SDK (#52468)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com> Co-authored-by: Chet Husk <baronfel@users.noreply.github.com> Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
1 parent 6576232 commit 9aec80a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Analyzers.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Copyright (c) .NET Foundation. All rights reserved.
2222

2323
<_NoneAnalysisLevel>4.0</_NoneAnalysisLevel>
2424
<!-- When the base TFM of the platform bumps, these must be bumped as well. Preview should always be the 'next' TFM. -->
25-
<_LatestAnalysisLevel>10.0</_LatestAnalysisLevel>
26-
<_PreviewAnalysisLevel>11.0</_PreviewAnalysisLevel>
25+
<_LatestAnalysisLevel>11.0</_LatestAnalysisLevel>
26+
<_PreviewAnalysisLevel>12.0</_PreviewAnalysisLevel>
2727

2828
<AnalysisLevel Condition="'$(AnalysisLevel)' == '' And
2929
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' And

test/Microsoft.NET.Build.Tests/GivenThatWeWantToFloatWarningLevels.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ static void Main()
159159
}
160160

161161
[InlineData(ToolsetInfo.CurrentTargetFramework)]
162+
// Fixing this test requires bumping _LatestAnalysisLevel and _PreviewAnalysisLevel
163+
// Bumping will cause It_maps_analysis_properties_to_globalconfig to fail which requires changes in dotnet/roslyn-analyzers repo.
164+
// See instructions in the comment in It_maps_analysis_properties_to_globalconfig
162165
[RequiresMSBuildVersionTheory("16.8")]
163166
public void It_defaults_preview_AnalysisLevel_to_the_next_tfm(string currentTFM)
164167
{
@@ -370,6 +373,10 @@ static void Main()
370373
[InlineData("10.0", "", "true", "")]
371374
[InlineData("10", "default", "false", "Security")]
372375
[InlineData("10.0", "", "true", "Usage")]
376+
[InlineData("11", "default", "false", "")]
377+
[InlineData("11.0", "", "true", "")]
378+
[InlineData("11", "default", "false", "Security")]
379+
[InlineData("11.0", "", "true", "Usage")]
373380
[RequiresMSBuildVersionTheory("16.8")]
374381
public void It_maps_analysis_properties_to_globalconfig(string analysisLevel, string analysisMode, string codeAnalysisTreatWarningsAsErrors, string category)
375382
{

0 commit comments

Comments
 (0)