I'm getting an error running Analyze -> Run Code Anlysis -> On Solution (See Below)
I am using:
Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.8.0 Preview 1.0
Roslynator Version 4.5.0
Severity Code Description Project File Line Suppression State Detail Description
Error AD0001 Analyzer 'Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer' threw an exception of type 'System.InvalidCastException' with message 'Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.RecordDeclarationSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax'.'.
Exception occurred with following context:
Compilation: Core
ISymbol: Value (NamedType)
System.InvalidCastException: Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.RecordDeclarationSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax'.
at Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer.ReportDiagnostic(SymbolAnalysisContext context, INamedTypeSymbol symbol, String interfaceName, String genericInterfaceName)
at Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer.AnalyzeNamedType(SymbolAnalysisContext context)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action1 analyze, TArg argument, Nullable1 info, CancellationToken cancellationToken)
Suppress the following diagnostics to disable this analyzer: RCS1241 Core D:\Cybernetics\Core\Core.csproj 1 Active Analyzer 'Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer' threw the following exception:
'Exception occurred with following context:
Compilation: Core
ISymbol: Value (NamedType)
System.InvalidCastException: Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.RecordDeclarationSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax'.
at Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer.ReportDiagnostic(SymbolAnalysisContext context, INamedTypeSymbol symbol, String interfaceName, String genericInterfaceName)
at Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer.AnalyzeNamedType(SymbolAnalysisContext context)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action1 analyze, TArg argument, Nullable1 info, CancellationToken cancellationToken)
'.
I'm getting an error running Analyze -> Run Code Anlysis -> On Solution (See Below)
I am using:
Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.8.0 Preview 1.0
Roslynator Version 4.5.0
Severity Code Description Project File Line Suppression State Detail Description
Error AD0001 Analyzer 'Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer' threw an exception of type 'System.InvalidCastException' with message 'Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.RecordDeclarationSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax'.'.
Exception occurred with following context:
Compilation: Core
ISymbol: Value (NamedType)
System.InvalidCastException: Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.RecordDeclarationSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax'.
at Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer.ReportDiagnostic(SymbolAnalysisContext context, INamedTypeSymbol symbol, String interfaceName, String genericInterfaceName)
at Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer.AnalyzeNamedType(SymbolAnalysisContext context)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action
1 analyze, TArg argument, Nullable1 info, CancellationToken cancellationToken)Suppress the following diagnostics to disable this analyzer: RCS1241 Core D:\Cybernetics\Core\Core.csproj 1 Active Analyzer 'Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer' threw the following exception:
'Exception occurred with following context:
Compilation: Core
ISymbol: Value (NamedType)
System.InvalidCastException: Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.RecordDeclarationSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax'.
at Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer.ReportDiagnostic(SymbolAnalysisContext context, INamedTypeSymbol symbol, String interfaceName, String genericInterfaceName)
at Roslynator.CSharp.Analysis.NamedTypeSymbolAnalyzer.AnalyzeNamedType(SymbolAnalysisContext context)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action
1 analyze, TArg argument, Nullable1 info, CancellationToken cancellationToken)'.