public Startup(IHostingEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", true, true) .AddEnvironmentVariables(); if (env.IsDevelopment()) { builder.AddUserSecrets("HashTagSecrets"); } Configuration = builder.Build(); NLogHelper.ConfigureNLog(Configuration["db:default"], "nlog.config"); }
public static void Main(string[] args) { Paths.EnsureDirsCreated(); NLogHelper.ConfigureNLog(); CreateHostBuilder(args).Build().Run(); }