Search Issue Tracker

Fixed in 5.1.1

Votes

15

Found in

4.3.0f4

Issue ID

578350

Regression

No

Cannot change code formatting in 'Braces' category

CodeEditors

-

This issue only occurs on Windows
To recreate:
1)Open any script in MonoDevelop
2)Go Tools->Options then under Source Code select Code Formatting
3)Choose C# source code in the list
4)Pick C# Format tab and press Edit
5)Select 'Braces' in Category
6)Try to change Statements from 'End of line' to 'Next line' and you will notice that is does not change anything and changes will not be saved (same case for all declarations in 'Braces' Category)

Comments (7)

  1. 3b8b17d0aaf44c4c4cc6025363891603?d=mm

    a_p_u_r_o

    Aug 20, 2015 18:40

    > By unchecking this checkbox, Unity does write the MonoDevelopSolutionProperties section to the .sln file.
    By unchecking, Unity does 'NOT' write any extra setting options to .sln file
    when creating it for the first time.
    But Unity 'DOES' delete every setting options from your .sln file
    when you invoke 'Sync MonoDevelop Project' . Beware!

    In Unity 5.2.0 'Sync MonoDevelop Project' has been renamed as 'Open C# Project' .

    Please fix this confusing documentation.
    > Should Unity write MonoDevelop properties to the solution (.sln) files?

  2. 4227ddb6e7cadcf86f847ad3c7fa349a?d=mm

    lukaszunity

    Jul 29, 2015 10:21

    Was fixed 5.1.0p1 by adding a "MonoDevelop Solution Properties" check box to Preferences / External tools. Also documented in the manual.

    http://docs.unity3d.com/Manual/Preferences.html

    By unchecking this checkbox, Unity does write the MonoDevelopSolutionProperties section to the .sln file.

  3. 564efa9e1002a87f6ccd2b396ac8acb4?d=mm

    prime31

    May 03, 2015 23:21

    Until Unity releases a fix you can use this Gist: https://gist.github.com/prime31/35a83fb8ad4eb385ab22 Just stick it in any Editor folder and it will watch for sln file changes and strip out the settings cruft that Unity injects into it.

  4. 47a1ba97d1fef1af72643103686d18ab?d=mm

    CatchCo

    Jul 31, 2014 01:35

    This bug singlehandedly prevents me from formatting my code automatically. It is a royal pain. I hope it can be addressed.

  5. 63ca35ccc0a541c1dbac59ed4f103aca?d=mm

    Meatgrind

    Apr 02, 2014 19:00

    If I'm not mistaken, this issue about code formatting concerns ALL formatting, not just a single element of the settings.

    There's tons of StackOverflow and UnityAnswers threads, blogs, etc. covering this problem from 2010 to 2014.

    Currently it seems that Unity regenerates the solution and project files for Monodevelop constantly, and keeps overriding all project settings changes you may have done (C# code formatting set to my custom style, most importantly for me).

    Unity's project setting defaults are uneditable to my knowledge, so currently all you can do is create a custom policy and apply it manually to the project in Monodevelop every time Unity syncs assets and regenerates the files. This is obviously a terrible workflow, and would take me from coding to clicking about, applying policy settings again every two minutes.

  6. 90021bdba6db66af709234c23b95dd00?d=mm

    MGS Shawn

    Jan 26, 2014 19:34

    MonoDevelop 4.01 which comes with Unity 4.3 is really bad with the curly braces and white space/newlines. Half the time it tosses my code several indentations right randomly, and puts the braces in very odd positions.

  7. 9b5c0ba8901b0a7d4838c0d73d383d5f?d=mm

    lazer

    Jan 14, 2014 02:31

    For me, this issue affects whitespace as well (at least). No matter what level (project, solution, or global) I set these at, they are overridden or have no effect in the editor. This is COMPLETE failure and makes all of my code ugly and useless. Been using VS for 20 years and that is how I want my code formatted. Period.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.