Why File.ReadAllLinesAsync() blocks the UI thread?

Sadly currently (.NET 5) the built-in asynchronous APIs for accessing the filesystem are not implemented consistently according to Microsoft’s own recommendations about how asynchronous methods are expected to behave. An asynchronous method that is based on TAP can do a small amount of work synchronously, such as validating arguments and initiating the asynchronous operation, before … Read more