All docs
V19.2
19.2
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

CRR0034 - The async method should contain the "async" suffix

This analyzer detects asynchronous methods without the "Async" suffix.

Task<string> DemoMethod(CancellationToken token) {
    token.ThrowIfCancellationRequested();
    DoThings(token);
    return Task.FromResult("Success");
}

Asynchronous methods should contain the "Async" suffix to more easily differentiate synchronous and asynchronous methods. Refer to the Important Info and Advice section of the Asynchronous programming article for more information.

Task<string> DemoMethodAsync(CancellationToken token) {
    token.ThrowIfCancellationRequested();
    DoThings(token);
    return Task.FromResult("Success");
}