TypeLoadException when testing analyzer running Roslyn 2.3.2
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.'
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.
This seems to happen with the early 2.x versions of Roslyn
These versions of the AnalysisContext class has some internal methods that can not be overridden this way. Would it be enough to only handle the public methods?
I'm guessing this is an oversight here? https://github.com/dotnet/roslyn-sdk/blob/102440e23287dd5b5f4598f00fd74aeef8c7b555/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerInfo.cs#L108