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.
At least for custom brace indentation
We are not observing this behavior. Could you please provide us screenshot/test steps for this.
XS 4.2.2 (build 2)
btw. copy & paste reindents the code - if that's your issue then it's a feature
Set brace indentation in settings
Wrote code that has two braces. It is indented. (Not always but most times)
Cut this code
Braces are not indented
Did you set the indentation in the project options or in the ide options ?
A screencast would really help us to understand your exact use case.
Note that the projects overwrite the IDE settings & the IDE settings are applied to new projects only.
So you mean that when I write code it uses one set of options, then when I paste it it uses a different one ? Sounds like an entirely different bug then !
Regardless of where i set them, shouldn't this behavior be consistent ??? If I write code or paste it, the indentation should be the same, right ?
Anyway, I usually set them in solution options.
I just checked: Project has 'inherited' as code formatting settings. All settings I've always done were at the Application level.
Ok if you set them at solution level then you're right that it had a bug.
The next release will fix that.
*** This bug has been marked as a duplicate of bug 15962 ***
I still don't understand it. When I write code, the braces are indented, so it works.
When I paste it, it does not work.
I can't understand why this is an issue with application/solution settings. In that case it should never work not even while writing code.
Ok what do you mean with it works when writing and it does not work on paste ?
What should happen on paste and what doesn't happen ?
1) Write code -> braces are indented on brace close (correct)
2) Paste same code -> braces are NOT indented (incorrect)
n 2) happens even if you copy/cut the code at 1) which is correctly indented
Doesn't make much sense to me - for me that works:
Note that paste only corrects indenting & doesn't correct formatting.
(We had too much trouble with running the formatter there - most people regard this behavior as bug)
1) set in settings: Braces go next line shifted
2) write this code:
3) notice that closing the brace makes both braces shift one tab (Console line is shifted too)
4) cut that code
5) paste that code
6) notice that both braces are now NOT indented
ok that's something I can reproduce & fix
Ok. Seems to me most indentation bugs revolve around next line shifted. Perhaps it wasn't tested that much ?
Unfortunately y :/ - it's something I implemented in the formatting options several years ago and it got forgotton because almost no one uses that.
But I it'll get better - I added some unit tests in the indentation engine for that. (The formatting should work)
I see. However I would be wary to assume that since nobody reported it nobody uses it.
Most bugs I report are seen by other people I know that simply have up using buggy functionality....
y - that's why I said 'almost' I don't think that you're the only one. But I would guess that I get bug reports from 1 of 100 people seeing it.
Reporting bugs is more important than most people think :/
1 out of 100 I think is a fair estimate. It's also a percentage that goes way down the more bugs are found.
I am now reporting something close to 100 bugs, which I had noticed for a long while, but I was just evaluating if it was worth my time or if I would better use some other workaround / tool.
A friend of mine was in the same spot but took the opposite course and just gave up.
Reporting bugs is important, and it's commendable that you keep track on them, but sometimes one is discouraged if he sees too many (but I'm especially referring to the VS plugin)
I tried to reproduce this issue at my end but unable to reach option "set in settings: Braces go next line shifted" which is mentioned in comment 12.
Please guide me how to set this option.
it's in the section where you choose where to position braces. there are multiple comboboxes where you can choose among other settings 'next line shifted'
I have verified this issue on below environment:
Xamarin Studio 4.2.4 (build 17)
Release ID: 402040017
Git revision: 00b6aafbd9d5b59499aa5f9e7ba274f55ed95d5d
Xamarin addins: 2debf1c1984b1d3d8312decda84dc966b7412433
I followed below steps:
1. Set Braces "next line shifted" for Statements.
2. Created console project.
3. Write below code:
4. Cut and past.
5. Observed that both braces and console statement shifted one tab.
Refer screen cast: http://screencast.com/t/15AO0EmCIq9