简体   繁体   中英

Resharper: Removing all comments

I just wondered if there was an option in visual studio's extension Resharper to remove all comments and summarys in the solution? I can't find an option anywhere for this, or is there any other kind of tool that does this?

I have tried googling support for this but unfortunately not many people want to do this where as I do.

I use visual studio 2017 if you was wondering.

So, I want this code:

/// <summary>Some method
/// <para>something else...</para>
/// <seealso cref="TestClass.Main"/>
/// </summary>
public void OnCall(string someString)
{
    // Some comment
    // Another comment
    Console.WriteLine(someString.Split(':')[4]);
}

To become this:

public void OnCall(string someString)
{
    Console.WriteLine(someString.Split(':')[4]);
}

I would also like to do the same with #region's if I could, any help would be appreciated.

试用Visual Studio 2015/2017的CommentRemover扩展

I guess this is not commonly used feature. Resharper doesn't have one for sure.

How about running VS "find and replace" feature with regexp that will cover your need? Like this one: "//.+$"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM