RazorEngine icon indicating copy to clipboard operation
RazorEngine copied to clipboard

Razor Nuget Packages for .NET 8.0

Open TonyValenti opened this issue 11 months ago • 4 comments

Hi all, I'm considering building a razor parsing/execution alternative to RazorEngine that is .net 8.0 only.

What is the correct Nuget package from Microsoft that parses/compiles/runs razor code?

I found lots of packages but I'm not entirely sure which one is the current/latest.

Thanks!

TonyValenti avatar Mar 13 '24 13:03 TonyValenti

@TonyValenti Are you familiar with this approach? https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-components-outside-of-aspnetcore?view=aspnetcore-8.0

I tried this, and was able to reference the RCL from a console project and use the sample code to render a *.razor template from the RCL.

SerratedSharp avatar Mar 29 '24 01:03 SerratedSharp

Hi @SerratedSharp - This is awesome! I'm working on a library now!

TonyValenti avatar Mar 29 '24 12:03 TonyValenti

@SerratedSharp https://www.nuget.org/packages/RazorString/

TonyValenti avatar Mar 29 '24 20:03 TonyValenti

@TonyValenti How do I call @Html.Raw() from your .razor file?

yohanespradono avatar Jun 22 '24 20:06 yohanespradono