Open
Description
Details about Problem
The nuget v3 API uses async/await extensively, but doesn't seem to use ConfigureAwait(false) internally. This means synchronous APIs have to go out of their way to avoid deadlocks by calling your code on the threadpool, like this:
var publishedPackages = Task.Run(async () =>
{
return await (await customRepository
.GetResourceAsync<PackageSearchResource>(cancellationTokenSource.Token)
.ConfigureAwait(false))
.SearchAsync("SomePackage",
new SearchFilter(true), 0, 100, NullLogger.Instance,
cancellationTokenSource.Token)
.ConfigureAwait(false);
}).Result
It would be super cool if you could add some .ConfigureAwait(false) calls wherever await is used. I don't believe there are any drawbacks.