Skip to content

AsyncFixer v2.1.0

Latest

Choose a tag to compare

@semihokur semihokur released this 29 Dec 08:17
· 1 commit to main since this release
  • AsyncFixer01: Add support for analyzing and fixing async local functions.
  • AsyncFixer01: Detect unnecessary async in methods with terminal awaits in all if-else branches.
  • AsyncFixer04: Detect fire-and-forget async calls in using var declarations (C# 8.0+) and warn when a task is returned from a using scope without being awaited. The disposable resource will be disposed before the returned task completes. (#13)
  • AsyncFixer04: Fix false positive when task is assigned to a variable and awaited later within the same using block (e.g., await Task.WhenAny(task, ...)).
  • AsyncFixer06: Fix false positive for Assert.ThrowsAsync and similar assertion methods where discarding the Task<T> result is intentional.
  • AsyncFixer03: Add test coverage for event handlers using Action<T> delegates. (#16)
  • Improve diagnostic messages and README for better AI assistant compatibility.
  • AsyncFixer06: New analyzer to detect implicit Task<T> to Task conversion in non-async lambdas. Unlike async lambdas which produce compiler error CS8031, non-async lambdas silently discard the result. (#26)
  • AsyncFixer01: Fix false positive with await foreach statements. (#41)
  • AsyncFixer01: Fix false positives for ValueTask<T> return types.
  • AsyncFixer02: Fix false positive with nameof(Task.Result). (#30)
  • AsyncFixer02: Fix false positive after Task.WhenAll - accessing .Result on awaited WhenAll tasks is safe.
  • AsyncFixer02: Fix false positives in synchronous local functions and lambdas inside async methods.
  • AsyncFixer03: Fix false positive with generic EventArgs types. (#39)
  • AsyncFixer05: Fix false positive with TaskTupleAwaiter and similar custom awaiters. (#31)
  • AsyncFixer05: Detect nested Task in return statements. (#27)
  • Code Fix: Correct nested invocation handling in Fix All operations. (#37)
  • Code Fix: Add parentheses when async conversion is followed by member access. (#38)
  • Upgrade Microsoft.CodeAnalysis to v4.8.0.

Nuget package

https://www.nuget.org/packages/AsyncFixer/2.1.0

Visual Studio 2022-2026 Extension

Updated with v2.1.0: https://marketplace.visualstudio.com/items?itemName=SemihOkur.AsyncFixer2022