Created
September 19, 2020 17:05
-
-
Save corespider/69a7357dda26cea7c0fb51ed7f3fea1c to your computer and use it in GitHub Desktop.
Razor File compilation-corespider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IWebHostEnvironment WebHostEnvironment { get; } | |
public Startup(IWebHostEnvironment webHostEnvironment) | |
{ | |
WebHostEnvironment = webHostEnvironment; | |
} | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllersWithViews(); | |
#if DEBUG | |
if (WebHostEnvironment.IsDevelopment()) | |
{ | |
services.AddRazorPages().AddRazorRuntimeCompilation(); | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment