Do I want normalized line endings?

Urbycoz picture Urbycoz · Apr 14, 2011 · Viewed 17.1k times · Source

I am getting the following message in Visual Studio 2008:

The line endings in the following file are not consistent. Do you want to normalize the line endings?

I don't understand what that means. Should I be clicking yes or no?

enter image description here

Answer

Rick Sladkey picture Rick Sladkey · Apr 15, 2011

The correct answer is almost always "Yes" and "Windows (CR LF)". The reason is that line endings in source files should almost always be consistent within the file and source files on Windows should generally have CR LF endings. There are exceptions but if if they applied to you, you would probably know about them. The warning is a good one because it informs you that somehow the file got into this inconsistent state and because it gives you a choice for how to handle the situation.