Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
!) Insure white space settings for Method invocations, Object creation and Element access all have "before opening parenthesis" or "Before opening bracket" unchecked in the White Space category of the Code Formatting settings.
2) Write a Method invocation, create an object, or access an element. Observe the white space which is added after the expression name but before the parenthesis or bracket.
Expected: whitespace settings for expressions should be respected.
100% repro on Mac. Haven't tested on PC.
At what point does the space get added? When you type the closing semicolon?
Did you check the solution formatting settings or just the default settings (which are only applied to new solutions)?
I wasn't aware there were a per-solution format settings. Setting my preferences there fixed the issue. Thank you so much!
Glad that sorted it for you!
Unfortunately this is a real usability issue, and it seems to come up fairly often. Although we feel this feature makes sense - it really helps to improve formatting consistency when there are different people editing the same solution - it's unexpected to people coming from VS, and we haven't found a good solution to the UX issue yet.
There *is( supposed to be a warning message that pops up in the preferences panel for these "policy" settings, but there seem to be a few cases it doesn't show up. I've filed bug 10632 regarding that.
I think a good solution may be an IDE setting:
[ ] Override project policies
And have this by default on - that should fit for the 'lone wolf' user - teams that need it can switch to project specific policies.
How about that ?
I think that would work. I'm evaluating Xamarin as an IDE to supplement MonkDevelop for Unity development. The problem I'm seeing is that Unity recreates the solution and projects often (whenever a new file is added). This blows away any solution preferences. I need a way to tell Xamarin to always override the settings in the solution with my global ones.
@Mike: TBH I think a user preference to override policies of all solutions that they open is a bad idea. It would mean any team would have to go and make sure everyone had/kept that setting turned on. Wouldn't it make more sense for each solution to have a "Use policies from user preferences" setting enabled by default - like projects have "Inherit policies from solution"?
@Will: is the solution file doesn't have policy setting then XS/MD should copy your default policies into the solution. Is this not working, or is Unity maybe generating solutions with some policy already set?
mhutch: doesn't matter much for teams. They need to set up the IDE somehow already (user name/email/standard header etc.).
But I agree that the setting 'use policies from user preferences' as default may be better. But we need to do something about the policy system.
Okay, I just discussed this with Lluis and he agreed that we should make solutions policies default to "Use user preferences". I've filed it as bug 10662.
*** Bug 10706 has been marked as a duplicate of this bug. ***