Last post Dec 13, 2018 08:41 PM by Bluenose
Dec 12, 2018 04:35 PM|Bluenose|LINK
I am getting the following dialogue box in VS 2017:
'The line endings in the following file are not consistent. Do you want to normalize the line endings?' It then gives the name of the file: Default.aspx.
There is then a drop down box with:
Windows (CR LF)
Unicode Line Separator
Unicode Paragraph Separator
Which line endings and what is meant by 'not consistent'? Not consistent with what?
Dec 13, 2018 03:22 AM|Ackerly Xu|LINK
Because the code line ends with \r\n, some lines's line breaks are \r or \n, \r\n is the default line break for the Windows operating system, and the latter two are linux and mac, so VS detected a problem and issued a warning. But because windows can also
recognize \r or \n newline characters, it is also possible to ignore them directly
If you are modifying the code to be used on linux on VS, you should choose which line ending to use.
If you want vs not to give a warning, you could select Tools->Options->Environment->Documents ,then uncheck Check consistent for line endings on load.
Dec 13, 2018 08:41 PM|Bluenose|LINK
Thank you - I have selected Tools->Options->Environment->Documents ,then unchecked Check consistent for line endings on load.