I think this is related to Code Rush.
VS keeps coming up saying that there is a error in the "DeclareProvider".
here is the stack trace:
C#System.NullReferenceException : Object reference not set to an instance of an object.
at Microsoft.CodeAnalysis.AnnotationExtensions.WithAdditionalAnnotations[TNode](TNode node,SyntaxAnnotation[] annotations)
at async DevExpress.CodeAnalysis.CSharp.CodeDeclare.PropertyDeclarator.RegisterNodeDeclarations(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.CSharp.CodeDeclare.MemberDeclarator.RegisterNodeDeclarations(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.CSharp.CodeDeclare.MemberDeclarator.GetNodeReplacements(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.CSharp.CodeDeclare.ElementDeclarator.Execute(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.CSharp.CodeDeclare.DeclareRefactoring.Execute(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.CSharp.CodeDeclare.DeclareRefactoring.ApplyChangeManagerAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.TargetPicker.TargetPickerRegistrator.DoRegistration(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.RegisterRefactoring(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
i am using VS v17.8.6
Hello,
Please share a sample project where we can reproduce the issue. I tested this behavior in different projects, but I couldn't reproduce it. So, it looks like the issue is related to specific code.
Hi Alex.
there is no sample as it randomly happens when i can working on my code in VS.
I just press the "Enable and Ignore" button and goes away.
the next time i happens, i will see if there is something that might of caused it.
Hello,
I look forward to hearing from you. In the meantime, we will research the code using the call stack you shared and see if we can add necessary checks to avoid the exception.