Skip to content

Commit 4f52e11

Browse files
Copilotjryckman
andauthored
Revert "Update net analyzers to 10.0 (#101)" (#103)
* Initial plan * Revert commit fb643b0: Revert analyzer versions and nuget configuration changes Co-authored-by: jryckman <4111629+jryckman@users.noreply.github.com> * Remove accidentally committed build artifacts and add .objs to gitignore Co-authored-by: jryckman <4111629+jryckman@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jryckman <4111629+jryckman@users.noreply.github.com>
1 parent fb643b0 commit 4f52e11

5 files changed

Lines changed: 8 additions & 10 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,3 +314,4 @@ $RECYCLE.BIN/
314314

315315
# Visual Studio local development settings
316316
launchSettings.json
317+
.objs/

build/NI.CSharp.Analyzers.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!--TODO: author and owner may have to change if we go to nuget.org -->
77
<authors>NI</authors>
88
<owners>NI</owners>
9-
<copyright>Copyright 2025 National Instruments Corporation</copyright>
9+
<copyright>Copyright 2024 National Instruments Corporation</copyright>
1010
<description>NI's code analyzers and rulesets for C# projects.</description>
1111
<summary>NI's code analyzers and rulesets for C# projects.</summary>
1212
<developmentDependency>true</developmentDependency>
@@ -22,7 +22,7 @@
2222
major version, make sure to update AnalysisLevel in NI.CSharp.Analysers.props
2323
too, otherwise new rules will not be properly enabled.
2424
-->
25-
<dependency id="Microsoft.CodeAnalysis.NetAnalyzers" version="10.0.100" />
25+
<dependency id="Microsoft.CodeAnalysis.NetAnalyzers" version="9.0.0" />
2626
<dependency id="Microsoft.CodeAnalysis.CSharp" version="4.2.0" />
2727
<dependency id="Microsoft.CodeAnalysis.Analyzers" version="3.3.3" />
2828
<dependency id="Microsoft.VisualStudio.Threading.Analyzers" version="17.10.48" />

nuget.config

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@
55
<add key="automatic" value="True" />
66
</packageRestore>
77
<packageSources>
8-
<!-- `clear` ensures no additional sources are inherited from another config file. -->
9-
<clear />
10-
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
118
</packageSources>
129
</configuration>

src/AnalyzerConfiguration/NI.CSharp.Analyzers.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
<AnalysisMode Condition="'$(AnalysisMode)' == ''">NI</AnalysisMode>
3232

3333
<!--
34-
If AnalysisLevel is not set, the .NET SDK will default to the version of the SDK. If the SDK is less than .NET 10,
35-
then despite having a .NET 10 analyzer nuget referenced, we will use the lower SDK version as the analysis level.
34+
If AnalysisLevel is not set, the .NET SDK will default to the version of the SDK. If the SDK is less than .NET 9,
35+
then despite having a .NET 9 analyzer nuget referenced, we will use the lower SDK version as the analysis level.
3636
37-
Thus we manually set the default analysis level to 10.0 to make sure .NET 10 warnings are still checked.
37+
Thus we manually set the default analysis level to 9.0 to make sure .NET 9 warnings are still checked.
3838
-->
39-
<AnalysisLevel Condition="'$(AnalysisLevel)' == ''">10.0</AnalysisLevel>
39+
<AnalysisLevel Condition="'$(AnalysisLevel)' == ''">9.0</AnalysisLevel>
4040
</PropertyGroup>
4141

4242
<!--

src/AnalyzerConfiguration/NI.CSharp.Analyzers.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<Analyzer Include="$(PkgStyleCop_Analyzers_Unstable)\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll"/>
4949

5050
<!-- Microsoft's CA analyzers -->
51-
<Analyzer Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)\analyzers\dotnet\Microsoft.CodeAnalysis.NetAnalyzers.dll"/>
51+
<Analyzer Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll"/>
5252
<Analyzer Include="$(PkgMicrosoft_CodeAnalysis_NetAnalyzers)\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll"/>
5353
<Analyzer Include="$(PkgMicrosoft_VisualStudio_Threading_Analyzers)\analyzers\cs\Microsoft.VisualStudio.Threading.Analyzers.dll"/>
5454

0 commit comments

Comments
 (0)