Maddening auto-format behavior with Visual Studio 2019 / Resharper that I cannot disable - resharper

This started happening for me in Visual Studio 2019 but does not happen in 2017. I cannot figure out how to stop it.
Something I do all the time is make use of Resharper's reformatting. Suppose I have little block of code like this:
Scan = scan;
Target = target;
IsDone = true;
ShouldAlign = false;
I want to align it up to look all nice and neat. So I select my block of code and I either use the menu or a keyboard shortcut to invoke Resharper's autoformat to line up the equals signs. Voila! Looks great, Here is the reformatted code, exactly as it appears, right after I've reformatted. Note the code is still selected:
But then all I have to do is I click anywhere else in the whitespace of that document, and Boom! Everything gets undone
It is as if VS2019 runs its own "Format Selection" command when I click away But I never did that. (but if I manually do, it has the same effect)
However if instead of just clicking away on the whitespace I, click the menu area of Visual Studio and then click the document whitespace, no problem. No reformat.
Just now I've just finished comparing Visual Studio 2017 and 2019 editing settings side-by-side next to each other. I've compared every single edit/formatting/spacing setting I can possibly find. Both Visual Studio's and Resharper's. They are identical except in those few cases where VS 2019 has some new setting that 2017 did not.
This still happens even when all of VS2019's "automatically format" settings are off
I'm asking the same question of the Resharper folks but I think it has to do with the interaction of the two.
Is anyone else seeing anything like this? It's driving me nuts.

After several hours of this, I have finally discovered that that problem was neither Visual Studio nor Resharper. It was actually a THIRD extension I use (also very common) for C++ files called Visual Assist".
VA has its own "format after paste" option. I am guessing that it must detect the reformat/click away as a "paste" operation and it reformats it according to Visual Studio's settings.
Once I disabled that in single, Visual Assist option VS2019 (as I apparently already had in 2017) everything worked well.

Related

ReSharper Shift+Alt+L (go to open file) not working in 2015 with .resx?

I'm wondering if this is just my ReSharper setup, but as of updating to Visual Studio 2015 with ReSharper Ultimate 9.1.3, using the Shift+Alt+L shortcut while editing a .resx in the designer does nothing.
Has anybody else experienced this, and is there any config that will get this working or is it a bug?
Thanks
This was caused (for me anyway) because my keyboard mapping had magically changed back to UK mapping from US (I want US).
The other day I had another issue that caused Resharper key mappings to go awry and followed some advice on another post (I can't find it at the moment) that want along the lines of:
Open Tools > Options > Keyboard and hit Reset
Open Resharper > Options > Keyboard & Menus, select "Visual Studio" and hit "Apply Scheme"
This should wrest control from Resharper back to Visual Studio and give Resharper the freedom it needs to wrest control back from VS.. ugh, but it worked
Maybe have a look to Stackoverflow - How to locate a file in Solution Explorer in Visual Studio 2010?.
Tools (in Menu) -> Options -> Keyboard -> goto input Show commands containing and type SolutionExplorer.SyncWithActiveDocument. Goto Press Shortcut Keys and press Shift + Alt + L click on Assign button.
You may get a warning that the shortcut is already in use.

visual studio 2012 puts a small number in the top left corner of my screen

I am wondering if anyone else has had this issue with visual studio (or a VS extension because I have a few installed) and what is causing this? The number goes away when I close visual studio and I have not been able to figure our what is causing this. The number is overlayed on my desktop and not just visual studio. It covers all other windows I have open as well telling me it's set to be always on top.
Anyone else come across this issue or what is causing it?
I figured it out!
This has been bothering me for years. I finally just sat down and solved the problem. Basically, VS has this little known feature where you can navigate through code lens with just your keyboard. If you press Alt for a couple of seconds, you will see numbers just like the ones that appear at the top of your screen above your current method. To fix it, just long press Alt again and the number should go away. If you have many VS instances open you might have to go through them one by one.
I don't have significant reputation to comment, but I am experiencing this both with VS2013 and VS2015 too. The only extension I have installed is Resharper.
My research shows that it is caused by the hover text / overlays from various components. The only way I have found to get rid of them is to close the Visual Studio IDE window responsible.

Code Snippet Completion Action VS 2012

In VS 2010, I could type prop and hit tab twice and it automatically inserted a property skeleton for me to complete. I recently switched to VS 2012, and now it only requires pressing tab once, and I find myself constantly having to shift-tab to return back to the return type.
Is there a way to change it back to two tabs? I have ReSharper, if that matters (had it in 2010, too).
Turns out that this is ReSharper, and changing this functionality is not currently possible. I can get the old completion behavior back, but it requires disabling ReSharper Intellisense entirely, and going back to VS Intellisense.

Restore intellisense after ReSharper trial expires

I have a C# license for ReSharper, and a little while ago Jetbarins gave me a license key for a 30 day trial of ReSharper full. This has expired and I have gone back to ReSharper C#, and as a result have completely lost VB intellisense.
How do I restore normal VB.Net intellisense from within Visual Studio? Is there a way to do this without resetting all Visual Studio settings (I have changed a number of settings, don't want to have to go through and change them all again).
I had this same problem after my ReSharper trial expired.
The fix is to go to Tools > Options > Text Editor > All Languages.
Then under Statement completion, ensure 'Auto list members' and 'Parameter information' are checked (for me they were partially selected)
Just an update for VS2013, you can go into Tools>Options and find Resharper as it's own menu item there, then click suspend.
It seems to undo all the changes it made at this point and restore my original settings.
Also consider reenabling errors in about the same place: Options > Text Editor > C# > Advanced
Under "Editor Help" section, recheck:
Underline errors in the editor
Show live semantic errors
Source: http://resharper-support.jetbrains.com/hc/en-us/articles/206104078-Visual-Studio-IntelliSense-is-broken-after-uninstalling-suspending-ReSharper

Resharper 5 vs 6

Back when I had ReSharper 5 my files would have all kinds of syntax highlighting and a bar next to the scrollbar to the right. It was wonderful because it would highlight redundant imports and possible code smells, as well mark things in the bar next to the scroll bar.
With ReSharper 6 I don't have any of that. I have to actually have cursor on what I want to change and wait for the pencil or light bulb to show up. Is this how ReSharper 6 is by default or do I have to reinstall it?
First make sure ReSharper is acutally activated. If it is, there should be a ReSharper top level menu entry in Visual Studio at the top.
If it is, make sure "Enable Code Analysis" is turned on in the ReSharper settings.
If it is not, enable ReSharper in the Visual Studio settings (Tools->Options). There should be an extra entry "ReSharper" in the list on the left side. Click the "Resume" button.
If you don't have such an entry in your Visual Studio settings, ReSharper is either not or not correctly installed.
Maybe the settings were not taken from the version 5 folder to the version 6 one. Try the following:
Make sure you close Visual Studio.
Go to:
Note: this folder is from a Windows 7 machine, since you didn't provide information on which version of visual studio you are using I'm putting 'x'
"c:\Users*your user*\AppData\Roaming\JetBrains\ReSharper\v5.x\vsxx.x"
In there you'll find a UserSettings.xml file open it for edit.
Look for the "SeverityTable" node. Select it and copy it.
Paste it on the same file that you'll find on the "c:\Users*your user*\AppData\Roaming\JetBrains\Resharper\v6.0\vsxx.x" folder. I recommend making a backup of the file before doing that.
Reopen visual studio. Resharper should be indicating all the recommendations and smells as it did before you updated it.
Hope this helps.

Resources