CS8892 error Async/await

I am getting error code CS8892. I can't run the app locally due to the error code. If the app is creating the code why is it creating errors. I tried opening the app in Visual studio and got the same error code. Any suggestions on how to fix this? Below is a sample of the code in question.

  public static async Task Main(string[] args)

    {
        var builder = WebAssemblyHostBuilder.CreateDefault(args);
        builder.RootComponents.Add<Client.App>("app");
        builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
        builder.RootComponents.Add<Microsoft.AspNetCore.Components.Web.HeadOutlet>("head::after");
        builder.Services.AddScoped<DialogService>();
        builder.Services.AddScoped<NotificationService>();
        builder.Services.AddScoped<TooltipService>();
        builder.Services.AddScoped<ContextMenuService>();
        builder.Services.AddLocalization();

        OnConfigureBuilder(builder);

        var host = builder.Build();

        System.Globalization.CultureInfo.DefaultThreadCurrentCulture = new System.Globalization.CultureInfo("en-US");
        System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = new System.Globalization.CultureInfo("en-US");
        await host.RunAsync();
    }

I’ve never seen such error before and unfortunately I’m not sure what can cause it.

Method will not be used as an entry point because a synchronous entry point 'method' was found.

This warning is generated on all async entry point candidates when you have multiple valid entry points, including one or more synchronous entry point.

Read more…