-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Milestone
Description
We don't add ConfigureAwait(false)
to ASP.NET Core code because there is no sync context. Microsoft.Extensions.* code could execute in client apps. Not using ConfigureAwait(false)
can create deadlocks when a user mixes sync with async, e.g. dotnet/extensions#999.
Consider introducing an analyzer to enforce ConfigureAwait(false)
everywhere. A quick search of this repos source code displays many non-test awaits that don't follow best practice.
I just had some good success using https://www.nuget.org/packages/ConfigureAwaitChecker.Analyzer/
TanayParikh
Metadata
Metadata
Assignees
Labels
area-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared framework