Compile Razor templates at build-time without a dependency on ASP.NET.
$ dotnet add package RazorBladeCompile Razor templates at build-time without a dependency on ASP.NET.
RazorBlade is meant to be lightweight and self-contained: cshtml files are compiled into C# classes at build-time with a Roslyn source generator. No reference to ASP.NET is required.
See the GitHub repository for more information.