Skip to content

Instantly share code, notes, and snippets.

@natemcmaster
natemcmaster / README.md
Last active August 4, 2023 07:59
ContentRoot, WebRoot, BaseDirectory, and CurrentDirectory

Assuming you use template defaults

public static void Main()
{
  var host = new WebHostBuilder()
                .UseContentRoot(Directory.GetCurrentDirectory())
                .Build();
}

public Startup(IHostingEnvironment env)