Skip to content

Instantly share code, notes, and snippets.

@crgrieve
Created July 2, 2021 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crgrieve/b9f9ffde937cb70595cb2ee4dd634059 to your computer and use it in GitHub Desktop.
Save crgrieve/b9f9ffde937cb70595cb2ee4dd634059 to your computer and use it in GitHub Desktop.
An example Program.cs for Umbraco v9 project with usings refactored to a global file.
namespace DotNet6Umbraco
{
public class Program
{
public static void Main(string[] args)
=> CreateHostBuilder(args)
.Build()
.Run();
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureLogging(x => x.ClearProviders())
.ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment