add #if DEBUG RazorRuntimeCompilation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2021-02-18 20:01:18 +01:00
parent 0fbf239593
commit 73fb03ffc6
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -36,7 +36,12 @@ namespace pwt_0x01_ng
});
services.AddControllersWithViews();
services.AddRazorPages();
IMvcBuilder builder = services.AddRazorPages();
#if DEBUG
if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT").Equals("Development")){
builder.AddRazorRuntimeCompilation();
}
#endif
var connectionString = Environment.GetEnvironmentVariable("DB_CONNECTION_STRING");
services.AddDbContext<DBContext>(options =>