The current DoNotDirectlyAWaitATaskAnalyzer code only pays attention to Task and Task{TResult}:
https://github.com/dotnet/roslyn-analyzers/blob/c9d6579f31fd4ad45f3d23187189657343b395a4/src/Microsoft.CodeQuality.Analyzers/Core/ApiDesignGuidelines/DoNotDirectlyAwaitATask.cs#L93-L96
It should also be augmented to pay attention to ValueTask and ValueTask{TResult} if they're available in the compilation unit.
Tagging @AArnott - we are actually planning on adding VS Threading analyzer package as a dependency of FxCop analyzers package, and deprecate CA2007 in favor of a similar rule in the threading package that handles both Task and ValueTask.
Yes, our VSTHRD111 rule already supports ValueTask for this scenario.
What's the suggested approach to solve the issue?
I'm using
# CA2007: Consider calling ConfigureAwait on the awaited task
dotnet_diagnostic.CA2007.severity = error and I'd like to have errors on ValueTask too, is it possible to have that with something to install on top of fxCopAnalyzers?
-- update --
nevermind, solved by myself
nuget => Microsoft.VisualStudio.Threading.Analyzers
editorconfig rule => dotnet_diagnostic.VSTHRD111.severity = error
Most helpful comment
Tagging @AArnott - we are actually planning on adding VS Threading analyzer package as a dependency of FxCop analyzers package, and deprecate CA2007 in favor of a similar rule in the threading package that handles both Task and ValueTask.