Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created January 25, 2017 05:45
Show Gist options
  • Save justinyoo/a77083d296151ee23aee66a7d5164bd4 to your computer and use it in GitHub Desktop.
Save justinyoo/a77083d296151ee23aee66a7d5164bd4 to your computer and use it in GitHub Desktop.
Adding YAML Settings into ASP.NET Core Apps
// Adds YAML settings first
builder.AddYamlFile("appsettings.yml", optional: true);
// Adds JSON settings later
builder.AddJsonFile("appsettings.json", optional: true, adOnChange: true);
builder.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment