I created a Web API project using the default ASP.NET Core Web Application (.NET Framework) template and then published to local folder using VS.
Now if I call
Once you publish the application and have a .exe file, you don't need to use dotnet anymore. The application is compiled!
dotnet
Just run application.exe by double-clicking it, or launching it from the console.