The "Import Missing Namespaces" Code Actions sounds like a great idea to import all namespaces that are missing in a given context. But I found that most of the time it either imports just one / a part of the actual missing namespaces or does flat out nothing at all. Do I do something wrong or is that feature designed differently?
Refactorings - The “Import Missing Namespaces” refactoring initiates a dead lock
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
- v19.2.9Download Official Update
Hi,
Thank you for the clarification. This refactoring works inside a selected code block with missing namespaces or for active code elements. To import all references into the current file, you need to select all text (Ctrl+A).
Let me know your result.
Other Answers
Hi and thanks for the quick response.
I made several videos.
- In one Code Rush just freezes VS and I had to kill VS via the task manager.
- In another one it starts "importing references" and after a minute or so I tried to cancel which didn't work as well. So I had to kill VS again via the task manager. I had to compress that one via 7zip to be able to upload it.
- The actual behaviour I meant: you can hit "Import missing References" and it imports one or does nothing. Or it doesn't even recognise a code action till you reopen the file.
All the samples where made with this project: https://github.com/NPadrutt/MoneyFox.Windows
The solution File I used was the MoneyFox.Desktop.sln. The File is the AccountListViewModel.
Also I ziped and attached my whole log folder.
Thanks
Nino
Hi Nino,
Thank you for the additional information. I reproduced this issue. We need some time to research it and check for a possible solution.
Hi,
The Import Missing Namespaces refactoring is adding all missing namespace references except types which are available in more than one namespace. Your report looks like a bug inside refactoring.
Please send us the CodeRush log files from the CodeRush\Support\CodeRush Logs… menu item. It would be great if you can create a small sample project or record a video illustrating the issue.
I'm looking forward to your reply.