Skip to content

Commit 6d0527a

Browse files
authored
Revert analyzer to lower CodeAnalysis version (dotnet/linker#2968)
Analyzers look for a newer version of Microsoft.CodeAnalysis than exists in the latest version of Visual Studio, and so they don't run in FullFramework tests in dotnet/sdkdotnet/linker#26993. This reverts the version used in the analyzers. PR dotnet/linker#2969 will undo this change once Visual Studio ships with the correct version of Microsoft.CodeAnalysis. Commit migrated from dotnet/linker@81ffbb5
1 parent 1bbf7ef commit 6d0527a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/illink/src/ILLink.RoslynAnalyzer/ILLink.RoslynAnalyzer.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
<ItemGroup>
1717
<None Include="Microsoft.NET.ILLink.Analyzers.props" CopyToOutputDirectory="PreserveNewest" />
18-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisVersion)" PrivateAssets="all" />
18+
<!-- The repo CodeAnalyis version is ahead of what is shipped with Visual Studio, so that version breaks the analyzers when used in .Net Framework builds -->
19+
<!-- Once Visual Studio ships with a version >= $MicrosoftCodeAnalysisVersion, this should be changed to use the property -->
20+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.0-2.final" PrivateAssets="all" />
1921
<PackageReference Condition="'$(DotNetBuildFromSource)' != 'true'" Include="StaticCs" Version="$(StaticCsVersion)">
2022
<PrivateAssets>all</PrivateAssets>
2123
<ExcludeAssets>contentfiles</ExcludeAssets> <!-- We include our own copy of the ClosedAttribute to work in source build -->

0 commit comments

Comments
 (0)