Hello,
sometime in the past pressing <CTRL>DOT on a "string.format" showed "Convert to string interpolation" as a possible option. This does no longer work.
Am I wrong or did you change something ?
The corresponding flag in CodeRush options is set.
Thank you
Michael
Refactorings - Convert to string interpolation should be available for concatenated strings
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.
- v17.2.4Download Official Update
Hi Michael,
Thank you for the update.
I have examined the video you provided and noticed that the setup of CodeRush on your machine has not been completed or broken.
To help us to understand the cause of the problem, provide us with Visual Studio's log file:
- Run Visual Studio with the /log command line switch and collect the activity log (log switch documentation).
- Search for the most recent ActivityLog.xml file inside AppData\Roaming\Microsoft\VisualStudio\15.0_InstanceId (while "15.0_InstanceId" looks similar to 15.0_0f1d8278, note that it might be different on your machine). Please send us the entire ActivityLog.xml file for research.
Also, could you try to manually uninstall CodeRush and then install the hotfix once again. Follow these steps:
- Close all Visual Studio instances.
- Go to the %LocalAppData%\Microsoft\VisualStudio\15.0_InstanceId\ folder and remove the ComponentModelCache subfolder.
- Go to the %LocalAppData%\Microsoft\VisualStudio\15.0_InstanceId\Extensions folder and remove all subfolders that contain the DevExpress.CodeRush.Package.pkgdef file.
- Remove all .cache files from the %LocalAppData%\Microsoft\VisualStudio\15.0_InstanceId\Extensions folder.
If you have several %LocalAppData%\Microsoft\VisualStudio\15.0_InstanceId\ folders on your machine, execute steps 2 - 4 for each of them.
After that, install the hotfix once again and try to reproduce the issue.
I'm waiting for your result.
Hi Alex,
to abreviate this process, I first tried to uninstall CodeRush and re-installed it after a reboot.
Now all works fine, the hell knows, why.
Thank you for your effort !
Michael
Michael,
I'm happy to hear that the problem was resolved. Thank you for informing us.
If you need any further help with this subject, feel free to reactivate this ticket.
Hi Michael,
Thank you for letting us know about this issue.
I have tried to reproduce it locally but failed. The "Convert to string interpolation" refactoring is available and works perfectly on my side. I have used the following code:
public class Class1 { void MethodName() { var a = 0; var b = 1; var str = string.For<<caret>>mat("{0}.{1}", a, b); } }
Could you provide us with a code sample where the problem has reproduced on your side and specify the caret position at the moment when you invoke the Quick Action (Ctrl + .) menu.
I'm looking forward to hearing from you.
Hi Alex,
I have created a screen video, but this is too large for sending it the normal way.
Could you please take it from
https://www.ctl.de/Media/Default/Downloads/DevExpress1.mp4
Thank you
Michael
Hi Michael,
Thank you for providing the screencast. It helped me reproduce the problem. Currently, CodeRush doesn't take into account the string concatenation expression (the "+" operator) that is passed as a format argument within the String.Format method call in your example. You will be notified when we prepare a fix.
Ok, thank you !
Michael, you are always welcome!