--- title: "ASP0021: The return type of the BindAsync method must be ValueTask" description: "Learn about analysis rule ASP0021: When implementing the BindAsync(...) method, the return type must be ValueTask." author: tdykstra monikerRange: '>= aspnetcore-8.0' ms.author: tdykstra ms.date: 03/27/2023 uid: diagnostics/asp0021 --- # ASP0021: The return type of the BindAsync method must be `ValueTask`. | | Value | |-|-| | **Rule ID** |ASP0021| | **Category** |Usage| | **Fix is breaking or non-breaking** |Non-breaking| ## Cause An implementation of the method has a return type that isn't . ## Rule description This diagnostic is emitted when an implementation of the `BindAsync` method has a return type that isn't `ValueTask`. ## How to fix violations To fix a violation of this rule, define a `ValueTask` return type for `BindAsync` and consider implementing to enforce implementation. ## When to suppress warnings Do not suppress a warning from this rule.