Bug 21404 - How to set C# code formatting to allow end-of-line comments?
Summary: How to set C# code formatting to allow end-of-line comments?
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 5.1
Hardware: PC Windows
: Normal enhancement
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2014-07-17 16:19 UTC by Frederic Rudman
Modified: 2015-05-20 01:01 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED FIXED

Description Frederic Rudman 2014-07-17 16:19:27 UTC
Description of Problem:
[I picked text-editor but this actually occurs when editing C# files: didn't see a category for that]

Steps to reproduce the problem:
1. put an end-of-line comment (i.e. '//...') after any member property (in any class) and as soon as auto-format occurs (e.g. on save) these end-of-line comments are moved over to the next line. VERY ANNOYING.

Lots of similar reports on the Internet/Xamarin forums with "helpful solutions" such as "NOT REALLY A PROBLEM," "NO LONGER A PROBLEM," "REINSTALL XAMARIN STUDIO." And my favorite "Put comments in front, as it's a better style anyway." 

Really!!!

Come ON!!! For $300, we'd like a solution not a runaround (or workarounds that, in any case, did not work us).


How often does this happen? ALL THE TIME. It's starting to be a serious problem because ALL our C# documentation uses this style of commenting.


Additional Information: Not the first time this has been reported.

In fact, I copied the title of one of the reports as title for this one on purpose (that particular one dating back to Nov 2013).

What gives???
Comment 1 Mike Krüger 2014-07-18 00:27:29 UTC
We're replacing the formatting engine with roslyn.
Unfortunately that's taking longer than expected.
I'll promise that we've that next year :).

I would turn off auto format on save.
Comment 2 Mike Krüger 2015-05-20 01:01:34 UTC
Fixed in 6.0 - we've almostly rewritten the whole IDE - did take some time :/