Inconsistent Line endings
See original GitHub issueThe current code generator is using the following to transform generated code to Unix Line Endings:
str.Replace(Environment.NewLine, "\n");
However, on Win systems that have been configured to use Unix style line endings there still seems to be a handful of CRLF codes in the generated files and the above method does not catch them. A better solution would be to simply match against the actual unwanted characters:
str.Replace("\r\n", "\n").Replace("\r", "\n");
This removes any dependency on having the correct system configuration to function as intended. Note: Order or operations matters with the above code.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top Results From Across the Web
What does Visual Studio mean by normalize inconsistent ...
Normalizing inconsistent line endings in Visual Studio means selecting one character type to be used for all your files. It could be:.
Read more >Normalizing line endings in Visual Studio 2019
When I open a cs file with inconsistent line endings, Visual Studio 2019 doesn't pop up Inconsistent Line Endings dialog box anymore.
Read more >Unity: "inconsistent line endings" dialog shows up ever ...
Visual Studio will open the script with the missing and a line ending dialogue window will show up. Go to the Line endings...
Read more >Fix inconsistent line endings - Microsoft Q&A
Hello all. To mimic this behavior: BUG IMP. A friend on this forum suggested to: Replace all vbCrLf to vbCr. Replace all vbLf...
Read more >There are inconsistent line endings in the "Assets/Scripts ...
There are inconsistent line endings in the 'Assets/Scripts/BlahBlah.cs' script. Some are Mac OS X (UNIX) and some are Windows.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Awesome, will be in the next release bb83d990c59266d6605da94a95389195a892a4ec
Tested on my own project and on Entitas-Shmup project too it fixes 😄 Thank you!