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.
It seems like code (document) formatting is not working properly in the new (stable) MD 3.0.1. Please review.
I notice things like indentation are not occurring, I tried also setting all C# code formatting to "Visual Studio" where available.
It also would be nice to have some documentation available on all the settings and options in MonoDevelop rather than shooting in the dark trying to figure out this stuff. And also better examples of these different formatting settings you now have available.
Y we can need a better source preview.
But what 'documentation' do you expect when you've a format option like: method brace style ?
I came across this problem also. Here are my Help-About stats:
Installation UUID: feaee481-7c2a-4781-a090-d6228809132d
Mono 2.11.1 ((no/426188e Tue May 15 15:50:21 EDT 2012) (64-bit)
Git revision: dc87d3242eedc2439f023c9e0b8883acfb3d8faa-dirty
Build date: 2012-05-16 14:50:52+0000
Linux pharos 2.6.35-32-generic #67-Ubuntu SMP Mon Mar 5 19:39:49 UTC 2012 x86_64 GNU/Linux
Be more specific.
Input -> Output + Expected output.
Sorry, I was not clear. Code formatting is not working. When I set the "C# Code Format" options and then do "Format Document" or "Format Selection" nothing happens or the code is formatted to options not specified by the options despite the code in question not adhering to the format specified by the options.
So for example, space after function call is unchecked, code like:
int y = f(x);
would get formatted to:
int y = f (x);
or another example, code originally written as:
int w = g (u);
will not change when selected and "Format Selection" is done.
Ok then there is a policy wrong
Check the c# code formatting options on the project level - I think they're set to mono. If the formatting jumps on it's working (we've a bug open about not beeing able to format - that's why I asked).
Note that the formatting options from IDE level may not affect the project.
The formatting options at the project level are "Inherited Policy" which I assume means inherited from the solution. The solution level is where I set the options.
I'm not sure if this is what you are suggesting, but I changed the policy at the project level to custom, selected some code, chose "Format Selection" from the menu, and there was no change to the selected code (though it violated the policy).
You're correct that "inherited" in the project policy means that it uses the solution policy. TBH I'm tempted to remove project-level policies, they seem to mostly be confusing. But they don't seem to be at fault here.
Works for me in 4.1 master