Inconsistent line endings - by Florian Haupt

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 381114 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/10/2008 11:43:29 PM
Access Restriction Public


I have created a new solution with some new projects. When I open this solution there are always some files where the message box "inconsistent line endings" pops up. The files are only edited in the IDE. The solution in the projects are not under source control. I do not have this behaviour before SP1. The message box is not popping up for every file in the projects only some and even if they were not changed the day before.
I saw that such a behaviour was reported before on the Visual Studio 2005 Beta, maybe it has the same reason?
Sign in to post a comment.
Posted by Microsoft on 4/8/2009 at 1:45 PM
Thanks for the update. Based on this additional information, it seems this dialog is behaving as expected. For both Visual Studio 2008 and the VS 2010 release we're working on now, the editor does not automatically normalize line endings on save. We check line endings when opening a file but not when saving or closing it, which is why you saw the dialog when you reopen the file the next day.

As you've noticed, there is certainly room for improvement in detection and fixing of inconsistent line endings. Given the tight schedule for VS 2010, we won't be able to fix this for the current release, but we will revisit this issue and the line ending normalization feature overall for a future version of Visual Studio.

Thanks again,
Posted by Florian Haupt on 4/7/2009 at 11:51 PM
When I edited the file I paste a part into the file, it was copied from a web source - but if the line endings were different in the part pasted this should be fixed after saving the first time?
Posted by Microsoft on 4/1/2009 at 4:28 PM

Thank you for reporting this issue. We looked at the solution you uploaded and found that the file test.cpp does contain inconsistent line endings. Some lines have both a line feed character and a carriage return whereas others only have the line feed, which explains why you were seeing the "Inconsistent Line Endings" dialog. What we're not sure about yet is what caused the inconsistent line endings.

If you can provide a bit more information, we'll be able to investigate further. Did you edit the file outside of Visual Studio? Did you run any macros or specific commands in VS when this happened?

Please note that you're under no obligation to respond or provide more information. If we don't hear from you within a week or so, I'll resolve this issue, but you'll be able to post more details or reactivate this bug at any time.

Thanks again for your feedback!
Brittany Behrens
Program Manager, Visual Studio Platform
Posted by Florian Haupt on 12/8/2008 at 7:27 AM
I have uploaded a new solution. The only file I edited is test.cpp and when opening it the inconsistent line endings message box pops up.
Posted by Microsoft on 11/17/2008 at 3:39 PM

We are unable to reproduce this issue without an example file. Could you please upload the file or an example file that will cause this dialog to appear?

Thanks for you help!
-Brad Peterson
Visual Studio Editor Team
Posted by Microsoft on 11/13/2008 at 4:01 AM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team