Since installing VS2017 I've been getting a lot of these messages, easily ten a day. I select the enable and ignore future errors option, but I still get errors on the same components. The latest one is ParameterRefactoringProvider, but I'd say i'm seeing the error on at least three or four different ones.Here's the stack trace from the current one:
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>)
This for VB.Net. Latest instance was editing a unit test class (NUnit), but I'm getting them all over the place
Any thoughts?
Hello Kevin,
Thank you for providing the stack trace.
It seems that we already fixed a similar issue after releasing CodeRush 16.2.6.
So, I suggest you install the build with the hotfix using this link: CodeRush.Roslyn-16.2.6.17072.vsix and try to reproduce issue with it.
If it does not help, it would be helpful if you provide us with a code snippet where the issue is reproducible.
I am concerned to hear that the latest CodeRush version brought a lot of error messages.
We will be very grateful if you can come up with a code snippet for each of these cases so we can reproduce the problem. In this case, we will definitely be able to fix it.
In addition, it would be useful if you send us your CodeRush log files (they can be obtained here: %LocalAppData%\CodeRush\Logs) so that we can investigate them.
We greatly appreciate your cooperation.
Thanks Pavel. I am installing the hotfix now. I will use it for a while to see if I still get problems. If I do, i will try to provide some snippets, etc
Unfortunately just happened again - see this screenshot: https://www.screencast.com/t/aLPIa5D9fhB
Tried to repeat it using the same steps, but didn't get the error. I've attached the latest log file
Kevin,
Thank you for providing steps to reproduce and the log file.
I managed to reproduce this issue on my side.
We will research it and notify you as soon as we have any results.
Interesting, I can't reproduce it with those steps. I wonder, could the hotfix have fixed the problem where "enable and ignore" was not blocking future notifications?
Kevin, I have managed to reproduce this issue with the hotfix installed.
The "Enable and ignore future errors" is VS built-in functionality which seems to not work correctly on my machine.
I have attached the screencast that illustrates its behavior.
Anyway, we will fix the original issue as soon as possible and let you know.
Hello - I'm getting this same type of behavior with v16.2.7 installed on VS 2017 and using VB.
Lots of repeated errors from ForEachToForProvider, same exact stack trace as the original report.
It's getting quite annoying. I do not see these errors in VS 2015, although I have the same version of CR Roslyn running in each.
Please let me know if you need additional information.
Thanks,
Matt
I've had it on a number of different providers, and it seems that fixing one does not fix the others. I know there are more fixes for ones I've reported due in the next release. Hopefully that will be a general fix, but we won't know until it's released
With the ForEachToForProvider provider I mentioned, I was getting the error reported before I would even invoke the Quick Action menu - just changing from one source file to another can (but doesn't always) trigger the message. But right now as I write this reply, I can't get it to occur, and the "For Each To For" refactor subsequently shows up in the Quick Action menu.
Hello Matt and Kevin,
> Lots of repeated errors from ForEachToForProvider, same exact stack trace as the original report.
Thank you for pointing out this issue to us.
To help us in our research, would you please provide us with CodeRush log files (they can be obtained here: %LocalAppData%\CodeRush\Logs)?
They contain additional information that should help us detect and fix this particular issue.
> It's getting quite annoying. I do not see these errors in VS 2015, although I have the same version of CR Roslyn running in each.
You are right, most of these issues are reproducible only in VS 2017, because VS 2015 and VS 2017 parse the same code, while you are typing data in different ways.
> I've had it on a number of different providers, and it seems that fixing one does not fix the others. I know there are more fixes for ones I've reported due in the next release. Hopefully that will be a general fix, but we won't know until it's released
We are working on a general fix that will prevent such issues with any CRR code actions.
We plan to ship this fix with the next CRR release in a few days.