I suggest you ...

Basic Refactoring Functionality needed

Right now when I want to make a section of code a method or make some simple refactoring, its not in the box. Rename is there, but its local to the page and doesn't go deep enough. The top 5-10 refactoring types should come in the box.

Merged from another idea: Improve the refactoring tools like code generation, rename, etc.

487 votes
Sign in
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    irperez shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


    Sign in
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      • Chris Guy commented  ·   ·  Flag as inappropriate

        The BEST solution is to install ReSharper, this will do much more and you can use it today.

      • Felix Gill commented  ·   ·  Flag as inappropriate

        I do not understand this suggestion .... if you select a code segment you can refactor it into a method already.... ???

      • Craig D commented  ·   ·  Flag as inappropriate

        Put another way the complaint is "Why do we have to spend another $400 on tools to make our $1000 software work properly?"

      • Qwertie commented  ·   ·  Flag as inappropriate

        Wow, 317 votes for an idea that is so nebulous. Personally I'd just like more refactorings available in VS Express (it offers only two). I write code at home, too, y'see. I'd use SD which has lots of refactorings, but it also has various misfeatures that annoy me really bad.

        How about an "extract common subexpression" feature which automatically identifies the common subexpressions and lets you pick one?

      • AdminVisual Studio Team (Product Team, Microsoft Visual Studio) commented  ·   ·  Flag as inappropriate

        We agree that improved refactoring support would be a welcome productivity boost for Visual Studio! Though we only offer a handful of refactorings in Visual Studio 2010, we have partnered with DevExpress to offer a free refactoring tool, CodeRush Xpress, which greatly augments the set that is available for both C# and VB. You can download CodeRush Xpress at http://msdn.microsoft.com/en-us/vstudio/ee663901.

        Additionally, if you haven't seen it yet, check out the Microsoft "Roslyn" CTP at http://msdn.microsoft.com/roslyn. While this CTP doesn't represent a specific committment to more refactoring features coming from Microsoft in Visual Studio, it does reveal the public API that we are planning to make it easy for VS extension writers to create new refactorings and quick fixes. See the following "how to" documents to see just how easy it will be to create new features with Roslyn.

        How To: Write a Visual Basic Quick Fix: http://msdn.microsoft.com/en-us/hh543921
        How To: Write a C# Quick Fix: http://msdn.microsoft.com/en-us/hh543922

        Dustin Campbell
        Visual Studio Program Manager

      • igor commented  ·   ·  Flag as inappropriate

        I'm missing "introduce local" / "replace temp with query". This is probably the only field Eclipse beats VS.

      • François REMY commented  ·   ·  Flag as inappropriate

        Even C# refactoring tools are not sufficient for me. Please have a look at Refactor! Pro and implements some of the most useful things. Or make an agreement with them to provide a simplified (free) version of Refactor! like you did for VS2005.

      • irperez commented  ·   ·  Flag as inappropriate

        If VB had the basic refactoring that C# has, all would be good. Thats what this recommendation is talking about. There is no extract as method in VB.

      • Sławek commented  ·   ·  Flag as inappropriate

        Improve code generation tool, based on convention:
        1. If I write IFoo Visual Studio should hint "Create interface for IFoo" instead of "Create class for IFoo".
        2. If I write this.foo = 123; Visual Studio should hint "Generate field stub for 'foo' in..." at first position instead of second.

      • The configurator commented  ·   ·  Flag as inappropriate

        A lot of ReSharper users are woefully unaware of features built in to VS, like extract method, extract interface, reorder/remove parameters. Every single example given in this thread already exists in vanilla VS. Can you please post examples which _aren't_ already implemented, so they can be discussed?

      • Scott commented  ·   ·  Flag as inappropriate

        I'd be happy with just "Extract as Method" and "Create interface from Class".

      • ian.ringrose commented  ·   ·  Flag as inappropriate

        I don't think Microsoft can keep up with ReSharper, so I seee no point in having only 99 reasons to buy ReSharper rathern then 101 reasons.

      • kennethkryger commented  ·   ·  Flag as inappropriate

        Microsoft should just buy ReSharper from JetBrains and include all the functionality into VS... Problem solved :)

      Feedback and Knowledge Base