How do I reliabily copy/paste text in Visual Studio 2015


  • I'm trying to copy/paste this text into a .txt file in Visual Studio. When I do so, all the newlines disappear and it's just one single ultra long line of text.

    Copy/pasting the same text to notepad.exe, which has had horrifically bad newline handling forever, works as expected and preserves formatting. I expect Visual Studio can be a more capable text editor than notepad.exe. So how do I copy/paste text with formatting in Visual Studio?

    Friday, December 09, 2016 10:30 PM

All replies

  • I cannot duplicated your issue.

    Created a new textfile and pasted your text, and added a CR to have 2 lines:

    Puzzle inputs differ by user.  
    Please log in to get your puzzle input.

    Copied the 2 lines.

    Then added a textfile inside a VS project, and pasted the copied lines.

    And NotePad opens the txt files as expected:

    No problem there.

    Where did you copied the 2 lines from before pasting into the txt file inside VS?
    Saturday, December 10, 2016 3:37 PM
  • Hi gohanman,

    Welcome to the MSDN forum.

    Does your issue is solved or not? If not, could you please share or update the information of your current issue? I tried to access the text(hyperlink) that you posted and it failed due to the HTTP 400 Bad Request error.

    If this issue is gone, could you please share your solution in here and mark it as answer, it will help other community members who have the same or similar issue to easier search this useful solution, thank you for your support.

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, December 12, 2016 7:57 AM