Skip to content
This repository has been archived by the owner. It is now read-only.

Analyzer 'RefactoringEssentials.CSharp.Diagnostics.ConvertClosureToMethodGroupAnalyzer' threw an exception of type 'System.TypeInitializationException' with message 'The type initializer for 'RefactoringEssentials.TypeGuessing' threw an exception.'. #390

Open
p-bojkowski opened this issue Aug 11, 2021 · 0 comments

Comments

@p-bojkowski
Copy link

HI!

can someone help on this?

Severity Code Description Project File Line Suppression State
Warning AD0001 Analyzer 'RefactoringEssentials.CSharp.Diagnostics.ConvertClosureToMethodGroupAnalyzer' threw an exception of type 'System.TypeInitializationException' with message 'The type initializer for 'RefactoringEssentials.TypeGuessing' threw an exception.'.
Exception occurred with following context:
Compilation: PBODEV.Base
SyntaxTree: C:\OneDrive\GitHub\PBO-DEV\PBODEV\src\PBODEV.Base\Validate.cs
SyntaxNode: currentValue => TrimStringAtStartEnd ... [SimpleLambdaExpressionSyntax]@[1422..1472) (31,22)-(31,72)

System.TypeInitializationException: The type initializer for 'RefactoringEssentials.TypeGuessing' threw an exception. ---> System.TypeInitializationException: The type initializer for 'RefactoringEssentials.CSharpTypeInferenceService' threw an exception. ---> System.TypeLoadException: Could not load type 'Microsoft.CodeAnalysis.LanguageServices.TypeInferenceService.AbstractTypeInferenceService1' from assembly 'Microsoft.CodeAnalysis.Workspaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.Type.GetType(String typeName, Boolean throwOnError) at RefactoringEssentials.CSharpTypeInferenceService..cctor() --- End of inner exception stack trace --- at RefactoringEssentials.CSharpTypeInferenceService..ctor() at RefactoringEssentials.TypeGuessing..cctor() --- End of inner exception stack trace --- at RefactoringEssentials.TypeGuessing.GetValidTypes(SemanticModel model, SyntaxNode expr, CancellationToken cancellationToken) at RefactoringEssentials.CSharp.Diagnostics.ConvertClosureToMethodGroupAnalyzer.TryGetDiagnostic(SyntaxNodeAnalysisContext nodeContext, Diagnostic& diagnostic) at RefactoringEssentials.CSharp.Diagnostics.ConvertClosureToMethodGroupAnalyzer.<>c.<Initialize>b__3_0(SyntaxNodeAnalysisContext nodeContext) at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__621.b__62_0(ValueTuple2 data) at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action1 analyze, TArg argument, Nullable`1 info)

System.TypeInitializationException: The type initializer for 'RefactoringEssentials.CSharpTypeInferenceService' threw an exception. ---> System.TypeLoadException: Could not load type 'Microsoft.CodeAnalysis.LanguageServices.TypeInferenceService.AbstractTypeInferenceService`1' from assembly 'Microsoft.CodeAnalysis.Workspaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.Type.GetType(String typeName, Boolean throwOnError)
at RefactoringEssentials.CSharpTypeInferenceService..cctor()
--- End of inner exception stack trace ---
at RefactoringEssentials.CSharpTypeInferenceService..ctor()
at RefactoringEssentials.TypeGuessing..cctor()

System.TypeLoadException: Could not load type 'Microsoft.CodeAnalysis.LanguageServices.TypeInferenceService.AbstractTypeInferenceService`1' from assembly 'Microsoft.CodeAnalysis.Workspaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.Type.GetType(String typeName, Boolean throwOnError)
at RefactoringEssentials.CSharpTypeInferenceService..cctor()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant