Stack Trace:
System.NullReferenceException : Object reference not set to an instance of an object.
at async DevExpress.CodeAnalysis.Refactorings.RefactoringAction.IsAvailable(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.RefactoringIsAvailable(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.GetAvailableRefactorings(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
Hello,
Thank you for providing the stack trace.
It looks very similar to the request from another customer, which we already fixed: Refactorings - "ParameterRefactoringsProvider" encountered an error and has been disabled when invoking Visual Studio QuickActions menu
So, please install the hotfix provided there and let us know your results.
If it does not help, could you please provide with us a code sample where the issue is reproducible?
We are looking forward to your response.
The ticket I mentioned in previous reply is private and you cannot access it, sorry for my mistake.
Use this link to download the hotfix: CodeRush.Roslyn-16.2.6.17072.vsix
Hi Pavel,
After applying the hotfix you provided I later received the error again (see below)
Could be related to nested functions
The code I was editing is as follows:
_ErrorTracker.RemoveError(inErrorKey:=ErrorKey(_LineReference, inControl1.Name))
Stack Trace:
System.ArgumentException : Node is not within syntax tree
at async DevExpress.CodeAnalysis.Refactorings.RefactoringAction.IsAvailable(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.RefactoringIsAvailable(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.GetAvailableRefactorings(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
Hi Dewey,
Thank you for providing the code snippet and stack trace.
We have tried to reproduce this issue with your code, but all our attempts were unsuccessful.
Moreover, it seems that it is another issue because there are two different exceptions: NullReferenceException in the first case and ArgumentException in the second case.
So, to help us with our research, please provide us with CodeRush log files (they can be obtained here: %LocalAppData%\CodeRush\Logs).
Also, it would be helpful if you provide us with a screencast that illustrates the issue in action. You can capture it using the free Jing tool from TechSmith.
We greatly appreciate your cooperation.
Hi Pavel,
Attached are the logs you requested.
Hello,
Thank you for providing the log files.
We still cannot reproduce this issue on our side, but we see the cause of the issue in the log files.
So, we will try to fix this issue based on the stack trace and notify you as soon as we make any progress.