Skip to content

Make method async code fix - method name changes to MethodNameAsync #20348

@davidroth

Description

@davidroth

Version Used:
VS 2017 (15.2)

Steps to Reproduce:

  1. Add await inside method body of Task method
  2. Invoke code fix "Make method async"
  3. Method is refactored to OriginalMethodNameAsync

Expected Behavior:

async keyword is added to method, but method name is untouched.

Actual Behavior:

async keyword is added to method, and method signature is refactored (Async suffix added). This is super annoying, especially if you have a virtual base method, which does not have the async suffix applied. If you have lots of usages this may lead to a huge (and slow) refactoring because all occurrences of this method will be renamed.

This is a regression from VS 2015 and makes this refactoring essentially useless in this circumstances.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringsNeed Design ReviewThe end user experience design needs to be reviewed and approved.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions