Skip to content

Refactoring "Make method async" should not add suffix "Async" to main method #26312

@josefpihrt

Description

@josefpihrt

Version Used: 2.7.0

Steps to Reproduce:

public static class Program
{
    public static void Main()
    {
        object x = await GetAsync(); // Make method async
    }

    private static Task<object> GetAsync() => Task.FromResult(default(object));
}

Expected Behavior:

public static class Program
{
    public static async Task Main()
    {
        object x = await GetAsync();
    }
}

Actual Behavior:

public static class Program
{
    public static async Task MainAsync()
    {
        object x = await GetAsync();
    }
}

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions