CRARCH0013 No blocking on async
- Category: Architecture
- Default severity: Warning
- Diagnostic ID:
CRARCH0013
What it checks
Section titled “What it checks”Blocking asynchronous calls can cause deadlocks and reliability issues.
Diagnostic message
Section titled “Diagnostic message”Avoid blocking async calls via .Result, .Wait(), or .GetAwaiter().GetResult()
How to resolve
Section titled “How to resolve”Use await instead of blocking APIs on tasks. Keep the containing operation task-returning so its caller can await it, and carry that asynchronous flow through callers that need the result. See CRARCH0012 for return-type guidance and its event-handler exception.