Cristopher Coronado
What is the purpose of Program.cs file in .NET Core project?
By Cristopher Coronado in .NET Core on Jul 31 2020
  • Varun Setia
    Aug, 2020 3

    .NET Core Applications are console applications. Program.cs is the entry Point for application. Like any application the execution of Application starts from public static void Main(string[] args){}

    This Program.cs creates the application Host. It configures the setiings file like appsettings.json,logging using CreateDefaultBuilder(args) and Startup.cs through webBuilder.UseStartup() which further helps in building dependencies.

    • 4
  • Vishal Yelve
    Jul, 2022 8

    Like C# console applications, ASP.NET Core has the Program class, which is an important class that contains the entry point to the application. The file has the Main() method used to run the application and it is used to create an instance of WebHostBuilder for creating a host for the application.

    • 1


Most Popular Job Functions


MOST LIKED QUESTIONS