RefactoringEssentials
RefactoringEssentials copied to clipboard
AddNullCheckCodeRefactoringProvider
For me the yellow error bar keeps re-appearing and showing me the AddNullCheckCodeRefactoringProvider
error, no matter how many times I clicked on “Enable and ignore future errors”. After a couple of edits, it comes back.
The method I'm working on does have one string parameter but does not have/need the null
check.
It happens both when editing and when debugging and stepping through code.
System.NullReferenceException : Object reference not set to an instance of an object. at RefactoringEssentials.CSharp.AddNullCheckCodeRefactoringProvider.ConditionContainsNullCheck(ExpressionSyntax condition,ExpressionSyntax identifierToCheck) at RefactoringEssentials.CSharp.AddNullCheckCodeRefactoringProvider.StatementWithConditionContainsNullCheck(SyntaxNode statement,ExpressionSyntax identifierToCheck) at async RefactoringEssentials.CSharp.AddNullCheckCodeRefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>) at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
Hi, it would be very helpful to have a code example and where your cursor is when this happens.
Hi. I'm sorry but I don't have the state of that project anymore. In case I experience such behavior again, I'll document everything.