Skip to content

Commit db1bece

Browse files
committed
Add razor runtime compilation
1 parent 5cc3ecc commit db1bece

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/CodeIsLife/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
//var isActiveRazorPages = true;
44

5-
builder.Services.AddControllersWithViews();
5+
var mvcBuilder = builder.Services.AddControllersWithViews();
6+
7+
if (builder.Environment.IsDevelopment())
8+
mvcBuilder.AddRazorRuntimeCompilation();
69

710
//if (isActiveRazorPages)
811
// builder.Services.AddRazorPages();

0 commit comments

Comments
 (0)