Skip to content

Commit

Permalink
Update analyzer package versions (#11076)
Browse files Browse the repository at this point in the history
I noticed some painful NuGet analyzer package upgrades in PR #11048 and
decided to take a look at the issue. I've made the following changes:

- `Roslyn.Diagnostics.Analyzers` is now versioned separately from
`Microsoft.CodeAnalysis.Analyzers`, as they are in
[`dotnet/roslyn`](https://github.com/dotnet/roslyn/blob/08243d3826b8ebbc38350d0d74796bb8176f55b1/eng/Directory.Packages.props#L4).
- I've removed direct references to `MS.CA.BannedApiAnalyzers` since
that reference should flow from `Roslyn.Diagnostics.Analyzers`.
- I've updated the versions of `Microsoft.CodeAnalysis.Analyzers` and
`Roslyn.Diagnostics.Analyzers`
  • Loading branch information
DustinCampbell authored Oct 24, 2024
2 parents 4f4effb + 84c7c1d commit e5aa079
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<_BasicReferenceAssembliesVersion>1.7.2</_BasicReferenceAssembliesVersion>
<_BenchmarkDotNetPackageVersion>0.13.5.2136</_BenchmarkDotNetPackageVersion>
<_MicrosoftVisualStudioExtensibilityTestingVersion>0.1.187-beta</_MicrosoftVisualStudioExtensibilityTestingVersion>
<_MicrosoftCodeAnalysisAnalyzersPackageVersion>3.11.0-beta1.24170.2</_MicrosoftCodeAnalysisAnalyzersPackageVersion>
<_MicrosoftCodeAnalysisAnalyzersPackageVersion>3.11.0</_MicrosoftCodeAnalysisAnalyzersPackageVersion>
<_RoslynDiagnosticAnalyzersPackageVersion>3.11.0-beta1.24508.2</_RoslynDiagnosticAnalyzersPackageVersion>
<_MicrosoftVisualStudioLanguageServicesPackageVersion>$(MicrosoftVisualStudioLanguageServicesPackageVersion)</_MicrosoftVisualStudioLanguageServicesPackageVersion>
<_XunitPackageVersion>2.6.3</_XunitPackageVersion>
<_MicrosoftBuildPackageVersion>17.11.0-preview-24309-01</_MicrosoftBuildPackageVersion>
Expand All @@ -34,7 +35,6 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzer.Testing" Version="1.1.2-beta1.24121.1" NoWarn="NU1608" />
<!-- Temporarily force analyzers to match compiler version https://github.com/dotnet/razor-tooling/issues/6758 -->
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="$(_MicrosoftCodeAnalysisAnalyzersPackageVersion)" NoWarn="NU1608" />
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(_MicrosoftCodeAnalysisAnalyzersPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="$(MicrosoftCodeAnalysisCommonPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Analyzer" Version="$(MicrosoftCodeAnalysisCSharpAnalyzerTestingPackageVersion)" />
Expand Down Expand Up @@ -106,7 +106,7 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Nerdbank.Streams" Version="2.11.74" />
<PackageVersion Include="NuGet.VisualStudio" Version="17.9.1" />
<PackageVersion Include="Roslyn.Diagnostics.Analyzers" Version="$(_MicrosoftCodeAnalysisAnalyzersPackageVersion)" />
<PackageVersion Include="Roslyn.Diagnostics.Analyzers" Version="$(_RoslynDiagnosticAnalyzersPackageVersion)" />
<PackageVersion Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutablePackageVersion)" />
<PackageVersion Include="System.Resources.Extensions" Version="8.0.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
Expand Down
1 change: 0 additions & 1 deletion src/Analyzers/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" NoWarn="NU1608" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" />
<PackageReference Include="Roslyn.Diagnostics.Analyzers" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion src/Compiler/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" NoWarn="NU1608" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="All" />
<PackageReference Include="Roslyn.Diagnostics.Analyzers" PrivateAssets="All" />

<ProjectReference Include="$(MSBuildThisFileDirectory)..\Analyzers\Razor.Diagnostics.Analyzers\Razor.Diagnostics.Analyzers.csproj"
Expand Down
1 change: 0 additions & 1 deletion src/Razor/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" NoWarn="NU1608" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="all" />
<PackageReference Include="Roslyn.Diagnostics.Analyzers" PrivateAssets="all" />

<ProjectReference Include="$(MSBuildThisFileDirectory)..\Analyzers\Razor.Diagnostics.Analyzers\Razor.Diagnostics.Analyzers.csproj"
Expand Down
1 change: 0 additions & 1 deletion src/Shared/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" NoWarn="NU1608" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" />
<PackageReference Include="Roslyn.Diagnostics.Analyzers" />

<ProjectReference Include="$(MSBuildThisFileDirectory)..\Analyzers\Razor.Diagnostics.Analyzers\Razor.Diagnostics.Analyzers.csproj"
Expand Down

0 comments on commit e5aa079

Please sign in to comment.