roslyn-sdk icon indicating copy to clipboard operation
roslyn-sdk copied to clipboard

TypeLoadException when testing analyzer running Roslyn 2.3.2

Open bjornhellander opened this issue 9 months ago • 3 comments

I get this exception when running analyzer tests against Roslyn 2.3.2:

System.TypeLoadException: 'Method 'RegisterOperationBlockStartActionInternal' on type 'CustomAnalysisContextImpl' from assembly 'codeAnalysisProxies_af0f5d57-e957-457a-bcb7-9146cf3acf3b, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is overriding a method that is not visible from that assembly.'

Image

I have created a solution using the analyzer template: https://github.com/bjornhellander/RoslynAnalyzerWithV232Problem The tests pass until the last commit where I downgrade the Roslyn packages to version 2.3.2.

Tested with version 1.1.2 of the Microsoft.CodeAnalysis.CSharp.*.Testing packages.

bjornhellander avatar Jan 03 '25 11:01 bjornhellander