Stop Visual Studio from mixing line endings in files

Brett Ryan picture Brett Ryan · Oct 22, 2010 · Viewed 126.8k times · Source

When opening a text based file in Visual Studio 2010 it will then write my edits with CRLF instead of the line ending format of the original file. How can I stop VS from doing this? Any half decent editor should have this capability.

What's worse is that since VS wrote the file with portions in CRLF, it then (when opening the file again) will present a dialog asking me to convert the files line ending.

Answer

GvS picture GvS · Oct 22, 2010

On the File menu, choose Advanced Save Options, you can control it there.

Edit: Here's the documentation, you should have a file open first.