Skip to content

JensDll/LoadError

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Load Error

SDK 8.0.205 has Microsoft.CodeAnalysis.CSharp.CodeStyle.dll version 4.9 and SDK 8.0.300 has 4.10.

<dotnet-home>/<sdk-version>/Sdks/Microsoft.NET.Sdk/codestyle/cs/Microsoft.CodeAnalysis.CSharp.CodeStyle.dll
/usr/share/dotnet/sdk/8.0.300/
~/.dotnet/sdk/8.0.300/

Microsoft.CodeAnalysis.CSharp.CodeStyle.dll needs Microsoft.CodeAnalysis.dll when loading (e.g. for SyntaxList<TNode>). There is an incompatibility between Microsoft.CodeAnalysis.CSharp.CodeStyle.dll 4.10 and Microsoft.CodeAnalysis.dll 4.9.

Reproduce

  • Use dotnet test -p:CodeAnalysisVersion=<version> to run the test case.
  • The NuGet reference Microsoft.CodeAnalysis.CSharp provides Microsoft.CodeAnalysis.dll through the Microsoft.CodeAnalysis.Common dependency.
  • With package reference <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2"/> the test only passes on SDK 8.0.205.
  • See test workflow and GitHub Actions. Notice the failing jobs on SDK 8.0.300 in combination with code analysis 4.9.