A few months ago I decided to upgrade to Visual Studio 2019. When using Unity together with Visual Studio a warning message started to appear:
There are inconsistent line endings in the 'Assets/name-of-script.cs' script. Some are Mac OS X (UNIX) and some are Windows. This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.
If you Google the problem, people tell you to download Strip'em for Visual Studio. I had Strip'em installed on the older version of Visual Studio, which is why the warning message never appeared then. So when I tried to download Strip'em for VS 2019, I couldn't because only VS 2017 and earlier are supported by Strip'em.
To solve this problem in VS 2019 and later versions, you have to go to the script giving you the warning. In the bottom-right corner of the script, you see a box called MIXED, meaning that your line endings are mixed.
If you click on the box, you can chose between:
- CRLF - Windows
- LF - Unix
- CR - old MacOS ( pre-OSX Macintosh)
Comments
Post a Comment