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>
This commit is contained in:
Anatolii Grynchuk
2026-05-02 03:41:03 +03:00
parent 349a5ac560
commit c9f776de80
3 changed files with 4 additions and 1 deletions
@@ -9,6 +9,7 @@
<ItemGroup>
<PackageReference Include="MailKit" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
<PrivateAssets>all</PrivateAssets>
+2 -1
View File
@@ -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();