Since the release of C# 7.1, it has been possibly to natively use the await operator in the Main method of a console application, but it requires a small project configuration change.

Here’s the default csproj created by the dotnet new console command:

<Project Sdk="Microsoft.NET.Sdk">



If you want to use async methods in Main, add the following inside the <PropertyGroup> node:


Now, you can change the signature of Main to the following:

public static async Task Main(string[] args)
    // async calls here