The C# async/await
syntax is very useful. However, even as of current latest major C# version 7.0, your program entry point has to use Wait()
or similar methods if you need an async
method.
This is solved in C# 7.1 (and with many other useful features). However, by default, Visual Studio 2017 uses latest MAJOR version (x.0). You need to change it into specific version, or latest MINOR version in order for the new features to be built successfully. And here's how:
-
Navigate menu Project → Properties...
-
Build tab → Advanced...