the line endings in the following file are not consistent.

来源:互联网 发布:平板一键刷机软件 编辑:程序博客网 时间:2024/05/22 15:40

有时候,打开别人的项目会出现: the line endings in the following file are not consistent.Do you want to normalize the line endings?

原因就是:因为代码行有的是以\r\n结尾,有的是\r或者\n,\r\n是windows操作系统的默认换行符,而后两者是linux和mac的,所以VS检测到了个问题,发出警告。但是因为windows也能识别\r或者\n换行符,所以直接忽略也是可以的(Tools->Options->Environment->Documents 里 Check consistent for line endings on load 不勾选就行了)。但是如果是在VS上修改要用在linux上的代码之类的情况,就要选择用哪种line ending了。

0 0