What's the alternative to runtime compilation if it will be no longer supported? #99
-
|
I read the Runtime Compilation section of the README of this project, in particular:
But I'm wondering what's the alternative? Isn't it the goal of this library to render a Razor view at runtime? Is it possible to compile it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hey @gitPhate, Runtime compilation is not possible with this library unfortunately as it's not the main goal. Instead it is to render the views that are already precompiled as part of building/publishing your project. In the README:
Before .NET 10, it was indeed possible to do runtime compilation using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation nuget package (original purpose was to do hot reload during development) along with the If Runtime Compilation is a mandatory requirement for your usecase, then I would point you to packages like RazorLight, which looks to support those scenarios. If I come across any other library, I'll add them here. Happy to discuss further, if there are any more questions. Thanks. |
Beta Was this translation helpful? Give feedback.
Hey @gitPhate, Runtime compilation is not possible with this library unfortunately as it's not the main goal. Instead it is to render the views that are already precompiled as part of building/publishing your project.
In the README:
Before .NET 10, it was indeed possible to do runtime compilation using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation nuget package (original purpose was to do hot reload during development) along with the
Razor.Templating.Corepackage. But, Microsoft made the RuntimeCompilation package obsolete. You can read more about the announcement and the reason here. So, there's no officially supp…