Commenting out code does not comment selection - by AndyW2007

Status : 


Sign in
to vote
ID 791106 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 6/26/2013 8:26:47 PM
Access Restriction Public


I have a small issue with VS2012 Update 3  (issue may occur in earlier versions).

in a .cshtml file (using razor syntax), highlighting a block of code and pressing Ctrl-K-C to comment out the block comments out additional code.  The work-around is to manually comment out code line by line which is very time consuming.

@if  (some statement)
@grid.GetHtml...  rest of statement.

Highlighting the @grid line and pressing Ctrl-k-c also comments out the if statement.   If a line of code exists after the @grid, it will comment the @if out but leave the closing }  as uncommented injecting a defect in the code.  Likewise if there is code before the @grid but after the opening brace {  it will comment out from the end of the code to the closing brace } again injecting a defect.
Sign in to post a comment.
Posted by Microsoft on 7/24/2013 at 3:02 PM
thanks for your feedback
this issue has been fixed in Visual Studio 2013.
Visual Studio 2013 Preview is available at this moment.
Posted by Helen [MSFT] on 6/27/2013 at 7:28 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Macy [MSFT] on 6/26/2013 at 8:52 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(