Why messages about CR/LF for files?

I keep getting messages about files having inconsistent line endings. In particular, Service generated files, when refreshed in the IDE, complain.

Is something being done wrong? Should I turn this off someplace? If I tell it to ignore these warnings, will something else be incorrect?

Thanks, logged as bugs://72330

generated by what? RO/.NET?

.Net sort of. Silverlight. Using the slSvcUtil with the Oxygene as language.

Looks like it also happened when I added a resource to the project. Opening the generated resource file, produces the warning.

Same for me - VS2015 Oxygene WPF projects. What’s the latest on this?

what exact files do you get the message on? whatever created the file is giving it inconsistent line endings. you can ignore it, but it should not happen…

I was manually adding methods to a WPF window pas file (using VS2015) (e.g. the Loaded method) because of the issue relating to double clicking on the method in the window’s methods to add it. I add the method to the pas file, then edit the xmal file (e.g. Loaded=“MyLoadedMethod”). It also seems to happen at random when doing normal editing work on any of the project’s pas files. Closing VS2015, then reopening seems to cure it, but difficult to tell since it doesn’t happen all the time. As you say, it’s not a major problem, so I’ll keep an eye on it and let you know if I can see a pattern.

next time it happens, can you tell VS to not fix it, and send me the source file, so i can check what parts have the wrong linebreaks? thanx!

Will do. Thanks.

1 Like

Hi Marc, attached a file showing the CRLF problem. Note some of the lines in the method: clsCommon.MinimisePath. They have just a LF character. As I recall, some of these lines were edited by me in VS2015, and some were copy/pasted from a website.

Hope this helps.

Regards Bob Russell

cdeCommon.pas (3.14 KB)

Ok, pasting from a website could ofc do it — that’d be a VS editor problem, we don’t control that afail. I’d be interested to find a scenario where our code turns a file that’s previously fine into a mixed file (eg., after adding a WinForms or WPF event handler, the newly inserted code would mismatch, say…)

Understood. I’ll keep an eye on it and update you if I find an example where it occurs with a totally “own edited” file.

1 Like

bugs://72330 got closed with status cannotrepro.