Code inspection: 'using' applied to a 'Task' instead of its disposable result
This inspection reports a using statement or declaration applied to a Task<T> where T implements IDisposable. In this case, using disposes the task, not its result, and the resource remains undisposed. Await the task so that using receives the resource.
Example
using (var resource = Resource.AcquireAsync())
{
}
using (var resource = await Resource.AcquireAsync())
{
}
27 October 2026