tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

ConfigureAwait(false) analyzer with improved “brain” (v2.0)

10 Jul 2018 .NET, C#, Multithreading/Parallelism/Asynchronous/Concurrency, Roslyn

The original ConfigureAwaitChecker tool I wrote was just a concept and I knew it had a lots of limitations. Luckily it idea was not completely dumb (even Jon Skeet thinks so) and hence when ideas for improvements came in, I was not skipping on these. And because these improvements become quite big, I’m releasing today version 2.0.

The biggest change is that now the analyzer uses also semantic model, thus it’s able to detect where the ConfigureAwait call is possible and where it’s not. Below you can see that after upgrading to new version the green squiggle disappears on Task.Yield(), while it still works on Task.Delay(100).

ConfigureAwaitChecker analyzer

Another improvement is that the analyzer was changed to .NET Standard 1.3 from PCL (as was default in Visual Studio 2015), broadening options where you can use it. And finally, some small big fixes in code fixes were parentheses were not properly adjusted.

As expected, you can get it from NuGet and give it a spin.

Profile Picture Jiří Činčura is an independent developer focusing on data and business layers, language constructs, parallelism and databases. Specifically Entity Framework, asynchronous and parallel programming, cloud and Azure. He's Microsoft Most Valuable Professional and you can read his articles, guides, tips and tricks at