When converting a large project and migrating to async
, one easy mistake is to forget awaiting them everywhere. Now the cs compiler will complain whenever we call a task and not await it, ONLY when this call is made from inside another async method.
In synchronous methods, cs will remain silent, but you'll be bitten at runtime.
I tried treating all warnings as errors, but nothing is changed, as I was not getting warnings in the first place.
So here is my question: Is there any way to make vs 2017 complain about not awaiting async Task
s from everywhere, including from non-async methods?
If you're aware of any light-weight and free add-on (not resharper, for instance), that can solve this, it would be appreciated as well.