Renaming local variables in Resharper 18.3.1 in Visual Studio 2019 16.1.3
Original code:
var myvar = "hello";
Console.WriteLine(myvar);
Want to rename myvar to message.
Cursor on myvar, F2, red outline appears, clear "myvar", type "message", type Enter.
The Enter keystroke itself is trapped as name of the variable, so the resulting code is:
var message
= "hello";
Console.WriteLine(message
);
Quite annoying as you can imagine.
I've tried Tab instead of Enter. That just uses whatever suggestion it has first, or just cancels rename.
I've tried Alt+Enter but that just invokes Resharper's actions. I've tried Esc, but that just cancels the rename altogether.
I've been unable to find some magic setting either in VS or Resharper.
Important: This seems to only happen to existing code. If the code is typed or pasted "fresh" (after file is open), it works as expected.
Is anyone else seeing this?
Thanks.
Please sign in to leave a comment.
Specific Resharper versioning:
JetBrains ReSharper Ultimate 2018.3.1 Build 183.0.20181225.200351
ReSharper 2018.3.20181226.120940
Application Packages:
JetBrains Platform Core Ide build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform Core MsBuild build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform Core Shell build 183.0.20181223.64728 on 2018-12-23 06:48:18Z rev git::refs/heads/183-eap11-rtm::09210cc87064ba2274e0e80f761cb3d7bc794440
.
JetBrains Platform Core Text build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform Installer build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform Interop CommandLine build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform Interop dotMemoryUnit Framework build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform Interop dotMemoryUnit Interop.Console build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform Interop dotMemoryUnit Interop.Ide build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform RdProtocol build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform UIInteractive Ide build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform UIInteractive Shell build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform UIInteractive Text build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Platform VisualStudio build 183.0.20181225.200351 on 2018-12-25 20:04:07Z rev git::refs/heads/183-eap11-rtm::69c393fed8e119fb8f0b0f747f6504222a6383ba
.
JetBrains Psi.Features Core build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features Diagramming build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features SolutionBuilder build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features src build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features Tasks build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features UIInteractive Core build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features UIInteractive Features build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features UIInteractive LiveTemplates build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features UIInteractive Refactorings build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features UIInteractive SolutionAnalysis build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features UIInteractive SolutionBuilder build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features UnitTesting build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains Psi.Features VisualStudio build 183.0.20181226.115733 on 2018-12-26 11:57:58Z rev git::refs/heads/183-eap11-rtm::4bcbd3b46fcfb4258ed60a1405d9c6210b484255
.
JetBrains ReSharper Plugins ReSharperTutorials build 183.0.20181226.120940 on 2018-12-26 12:10:10Z rev git::refs/heads/183-eap11-rtm::b6a267b1f5c772e734f783a9f915546cc8ea1d56
.
JetBrains ReSharper src build 183.0.20181226.120940 on 2018-12-26 12:10:10Z rev git::refs/heads/183-eap11-rtm::b6a267b1f5c772e734f783a9f915546cc8ea1d56
.
ReSharper 2018.3.1 Licensed to [snip], assigned to [snip]. Subscription is valid through 3/14/2020. Perpetual for builds released before 3/15/2019
Deployment Packaging Identity: 183.0.20181226.201321
Visual Studio Enterprise 2019 (Version 16.1.29009.5, InstanceID f8feca6b).
DevEnv InstallDir: “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE”
DevEnv LocalAppData: C:\Users\[snip]\AppData\Local\Microsoft\VisualStudio\16.0_f8feca6b
Copyright © 2000–2019 JetBrains. All rights reserved.
Seems to have been corrected in Resharper 2019.1.2