Hi
An update has just been done for VS 2017rc (RC.3+26127.0) - and I've started getting the below error:
"DeclareProvider" encountered an error and has been disabled.
The stack trace is:
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>)
Basically happens when I press the shortcut keys (CTRL+period) to open the suggestion box for the red squiggle line. However if I hover my mouse over the squiggle and select "show potential fixes" with the mouse I don't get the issue.
Let me know if you need any other info
Oops forgot to add…
2. After the yellow bar error at the top clicking "Enable and ignore future errors " does nothing, error still shows next time.
Hi Alan,
Thank you for letting us know about this problem.
I have reproduced it locally. You will be notified when we prepare a fix.
WOW, I'm always amazed at how quick you fix issues, great work, I've requested a HF so will test that and report back when I get it - great work guys!
Thank you, Alan! You are always welcome!
The hotfix is available - please give it a try.
Downloaded, installed, and quick test - Worked wonders, thanks for being so prompt on this. I'll keep you posted if it happens again, or any other problems I have! Thanks!
Alan, I am happy to hear that the fix works as expected on your side. Thank you for letting me know.
Thank you Alex,
you guys are incredible fast :-)
The fix seems to work here also.
Hi Peter,
Thank you for informing us! We are happy to hear what the problem has been resolved.
I have applied the hotfix from https://www.devexpress.com/support/center/Question/Details/T477079. I am unable to apply this hotfix on-top of the existing hotfix.
Hi Andrew,
Thank you for letting us know about this problem. Please install the following daily build which contains fixes for both the T477079 and T478207 issues:
DevExpress.CodeRush.Roslyn-16.2.4.17039.vsix
After installing the update the error message changed but the steps to reproduce are the same. The new error message is:
System.InvalidCastException : Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.ConstructorDeclarationSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax'.
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,
I've created a separate ticket on your behalf (T481354: Declare Parameter throws the InvalidCastException). It has been placed in our processing queue and will be answered shortly.