dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.04k stars 4.03k forks source link

Uncomment not working for XML comment lines in C # #52681

Closed vsfeedback closed 2 weeks ago

vsfeedback commented 3 years ago

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice] When uncommenting XML comment style lines in a C# file (starting with 3 slashes /// ) then only 2 slashes are removed. For example:

        /// <summary>
        /// Prevents a default instance of the <see cref="ConfigurationHandler" /> class from being created.
        /// </summary>
        private ConfigurationHandler() {}

leaves me with:

    / <summary>
    / Prevents a default instance of the <see cref="ConfigurationHandler" /> class from being created.
    / </summary>
    private ConfigurationHandler() {}

Which is totally useless.

To repro: insert XML style comments to any method, select the lines with 3 slashes, press Ctrl+K, Ctrl+U (or select "uncomment lines" from Edit/Advanced)


Original Comments

Feedback Bot on 4/12/2021, 07:11 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

sharwell commented 3 years ago

I've marked this as Need Proposal prior to design review. The behavior of removing all three / would be equally meaningless, as the contents of an XML comment are not valid code.

CyrusNajmabadi commented 3 years ago

I agree with @sharwell here. It's not clear when or why this would actually come up, or what the desired behavior would need to be.

CyrusNajmabadi commented 2 weeks ago

Closing out due to lack of reasonable design and feedback.