dotnet/roslyn

VS2017: Undesired reformatting when uncommenting a section

Open

#29,647 opened on Sep 3, 2018

View on GitHub
 (9 comments) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-IDEDeveloper CommunityIDE-Formatterhelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

I'm working in C# and I have a line of code like this:

foo( a, b );

I decide to comment it, using the toolbar button or CTRL-K, CTRL-C. It becomes:

//foo( a, b );

Then I want to revert the operation, using the opposite function. VisualStudio decides that removing the comment marker is not enough, and the line becomes:

foo(a, b);

Please do NOT reformat my code without my consent, ever!

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/324827/vs2017-undesired-reformatting-when-uncommenting-a.html VSTS ticketId: 674251 These are the original issue comments: (no comments) These are the original issue solutions:

Jinu Joseph [MSFT] solved on 9/3/2018, 04:16 AM (4 hours ago), 0 votes: Thank you for your feedback! This issue appears to be identical to https://github.com/dotnet/roslyn/issues/29482 We recommend that you vote on and follow the earlier reported issue for updates and fix notifications.

Contributor guide