visual studio copy paste bug

24,125

Solution 1

I have VS2010, same problem. The culprit? I had Remote Desktop open.

Solution 2

I had the same copy paste problem in vs2017 and i reset the keyboard shortcuts. Resharper the culprit.

Tools -> Options -> Search for keyboard(in search options) and click on Reset button.

enter image description here

Solution 3

Ctrl+C & Ctrl+V on a line without any selection, does copy the line for me in VS2008 and VS2010.

Have you tried, Ctrl+X, then Ctrl+V, this should cut and paste the line back in the same place, but have the line contents in your clipboard buffer like using copy.

Solution 4

I have experienced that problem before. In my case was a veeeeery simple explanation!
There is a shortcut of Ctrl+(Supr or Ins) that also work to copy and paste. So, in my case, when I did the Ctrl+C, and then modified some code before the paste, I used very often the Ctrl key, and the Begin End , those keys are next to the Supr Ins keys, so what happened is I actually did other copy action (empty line) and when I pressed Ctrl+Paste the clipboard was actually filled with the empty lines... ! :)

Maybe you did not know the Ctrl+Ins+Supr shortcut to copy and paste and you are pressing that combination while modifying the code.

Hope that is your situation :)

Solution 5

Try closing all code/class/form windows - then opening them up again. I found that Copy and Paste worked on some code windows, but not others.

Note: I had some extensions installed which bugged out, but I only saw the error message when I closed certain code windows.

Share:
24,125
Rana
Author by

Rana

Updated on July 29, 2021

Comments

  • Rana
    Rana almost 3 years

    when i hit ctrl + c without selecting anything (it should copy that line) and make some changes in the code then paste to another section, however the copied code is no longer there. im using visual studio 2010 and 2008, they both have this bug. anyone else noticed this bug?