Search Unity

3,5 monodevelop Line Endings Warning

Discussion in 'Developer Preview Archive' started by TheCasual, Jan 24, 2012.

  1. TheCasual

    TheCasual

    Joined:
    Sep 30, 2010
    Posts:
    1,289
    Hey guys, is there a way to disable the pop up that keeps telling me on every script i open that the line endings are different. This warning seems to affect nothing whatsoever, but since installing 3.5 , it is constantly popping up with all my scripts. Im not sure even what it means, the lines are identical.
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,107
    It means the difference between Unix and Windows line endings. If you don't have consistent line endings, it's quite possible that error messages won't list the correct line.

    --Eric
     
  3. TheCasual

    TheCasual

    Joined:
    Sep 30, 2010
    Posts:
    1,289
    So , by opening and closing and accepting the pop up with each of my scripts , it should be fine?
     
    ComicReese likes this.
  4. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,094
    True, that popup is indeed a bit annoying ....
     
  5. KidShenck

    KidShenck

    Joined:
    Dec 29, 2011
    Posts:
    1
    You can get rid of the warning by going to Project->Solution Options in Monodevelop. Under Source Code->Code Formatting->C# source code, switch the line endings to Unix.

    By default, source files created by Unity have Unix line endings, so all new files you create in this solution won't generate the warning. Any files you converted before will probably pop up the warning to be converted back.

    The same can be done in Tools->Options or Tools->Custom Policies... so that any new project will use the right settings.
     
    vama89 and yoeyyutch like this.
  6. TheCasual

    TheCasual

    Joined:
    Sep 30, 2010
    Posts:
    1,289
    Thats really good to know, thanks m8.
     
  7. hozoNe

    hozoNe

    Joined:
    Sep 26, 2012
    Posts:
    3
    Ohh, thanks a lot KidShenck for that tip, the line ending warning was a little bit annoying :p
     
    yoeyyutch likes this.