-
I'm using app.MapGet("/test", async () =>
{
#if DEBUG
RazorTemplateEngine.Initialize();
#endif
var html = await RazorTemplateEngine.RenderAsync($"/Pages/Index.cshtml");
return Results.Extensions.Html(html);
}); This enables hot reload for me. I figure that
|
Beta Was this translation helpful? Give feedback.
Answered by
hallsbyra
Dec 13, 2023
Replies: 1 comment
-
Turned out the call to
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
soundaranbu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Turned out the call to
Initialize
had nothing to do with enabling hot reload for me. So I don't use it anymore. Instead, to get hot reload working:Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
builder.Services.AddRazorPages().AddRazorRuntimeCompilation()