In Visual Studio 2013 in the project (in code) when you press F5 or F6 (did not try other hot keys), or call assembly / debug from the menu - the line of code is transferred to the place where the mouse is located (emulate the delete key) Below is an example of what is happening , in this case it is transferred {
- see the DevExpress extension settings - Grundy
- ru.stackoverflow.com/q/705023/178988 - the same problem in VS 2015 - Qwertiy ♦
4 answers
If the problem is not in the plugins, then the auto-format settings are
Tools->Options->Text Editor ->C# -> Formatting
- Thanks for the advice, but changing the settings did not affect the problem :( - Bogdan Rudnytskyi
- @ Bogdan Rudnitsky Did you just change the
Generalor all the parameters in theFormattingsection? - Vadim Pavlovich - @ Bohdan Rudnitsky See if all the checkboxes are in the
Tools->Options->Text Editor ->C# -> Formatting -> New Lines -> New line options for bracesthis is where the brackets transfer is configured. - Vadim Pavlovich - I didn’t try it either, it didn’t help (it’s not in brackets here ... - Bogdan Rudnytskyi
Faced exactly the same chip! VS 2012 upd 5. From special stages - DevExpress, SVN, ReSharper .
I reset the settings of the hot buttons of the studio and resharper - it did not help.
Turned off the resharper, restarted the studio with the project - the glitch was gone ! I turned on the resharp back, restarted the studio with the project - there’s no glitch, uh!
ps Unfortunately, the next time the computer restarts, the bug returned ((
- thanks, it didn't help (but now it's clear that this is because of Resharper, because if you turn it off - there is no such problem ... - Bogdan Rudnytskyi
Most likely you have a third-party plugin installed that formats the code when saving the file.
Look for the villain in Tools → Extensions and Updates .
When you run the application under debugging, compilation starts automatically. Before compiling, the studio automatically saves all sources. When you save the plugin formats the code.
- I only have extensions installed by DevExpress and SVN, I unfortunately cannot disable them. I also noticed such a nuance that this problem exists only in one project - Bogdan Rudnytskyi
Go through extensions. One of them spoils something.
- I only have extensions installed by DevExpress and SVN, I unfortunately cannot disable them. I also noticed such a nuance that this problem exists only in one project - Bogdan Rudnytskyi

