You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open the project and do the required SQL project updated
Navigate to InstructorController.cs
Expected Behavior:
No analyzer crash
Actual Behavior:
Warning AD0001 Analyzer 'Microsoft.CodeAnalysis.CSharp.UseObjectInitializer.CSharpUseObjectInitializerDiagnosticAnalyzer' threw an exception of type 'System.InvalidCastException' with message 'Specified cast is not valid.'.
'Exception occurred with following context:
Compilation: ContosoUniversity
SyntaxTree: C:\Users\jmarolf\Downloads\ASP.NET MVC Application Using Entity Framework Code First\C#\ContosoUniversity\Controllers\InstructorController.cs
SyntaxNode: new InstructorIndexData() [ObjectCreationExpressionSyntax]@[610..635) (22,28)-(22,53)
System.InvalidCastException: Specified cast is not valid.
at Microsoft.CodeAnalysis.Options.OptionSet.GetOption[T](PerLanguageOption`1 option, String language)
at Microsoft.CodeAnalysis.UseObjectInitializer.AbstractUseObjectInitializerDiagnosticAnalyzer`7.FadeOutCode(SyntaxNodeAnalysisContext context, OptionSet optionSet, List`1 matches, ImmutableArray`1 locations)
at Microsoft.CodeAnalysis.UseObjectInitializer.AbstractUseObjectInitializerDiagnosticAnalyzer`7.AnalyzeNode(SyntaxNodeAnalysisContext context)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__DisplayClass42_1`1.<ExecuteSyntaxNodeAction>b__1()
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock(DiagnosticAnalyzer analyzer, Action analyze, Nullable`1 info)
The text was updated successfully, but these errors were encountered:
Version Used: d15rel/15.0.25902.2
Steps to Reproduce:
Expected Behavior:
No analyzer crash
Actual Behavior:
The text was updated successfully, but these errors were encountered: