From c9f776de8070f4c2ea3433115fef3b5862b31bc5 Mon Sep 17 00:00:00 2001 From: Anatolii Grynchuk Date: Sat, 2 May 2026 03:41:03 +0300 Subject: [PATCH] feat: add razor runtime compilation for development Views are now recompiled on request without needing a full rebuild. This makes .cshtml changes take effect immediately during development. Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Directory.Packages.props | 1 + .../HrynCo.NotificationService.Web.csproj | 1 + HrynCo.NotificationService.Web/Program.cs | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 86e916d..8717ba7 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -17,6 +17,7 @@ + diff --git a/HrynCo.NotificationService.Web/HrynCo.NotificationService.Web.csproj b/HrynCo.NotificationService.Web/HrynCo.NotificationService.Web.csproj index 0514d66..d781c6f 100644 --- a/HrynCo.NotificationService.Web/HrynCo.NotificationService.Web.csproj +++ b/HrynCo.NotificationService.Web/HrynCo.NotificationService.Web.csproj @@ -9,6 +9,7 @@ + all diff --git a/HrynCo.NotificationService.Web/Program.cs b/HrynCo.NotificationService.Web/Program.cs index 6661fa5..01bc011 100644 --- a/HrynCo.NotificationService.Web/Program.cs +++ b/HrynCo.NotificationService.Web/Program.cs @@ -13,7 +13,8 @@ var appSettings = builder.Configuration builder.Services.AddSingleton(appSettings); builder.Services.AddOpenApi(); -builder.Services.AddControllersWithViews(); +builder.Services.AddControllersWithViews() + .AddRazorRuntimeCompilation(); builder.Services.AddNotificationDataAccess(appSettings.ConnectionString); builder.Services.AddNotificationServices();