Antaris / RazorEngine

Open source templating engine based on Microsoft's Razor parsing engine
http://antaris.github.io/RazorEngine
Other
2.13k stars 578 forks source link

Razor Nuget Packages for .NET 8.0 #600

Open TonyValenti opened 3 months ago

TonyValenti commented 3 months ago

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!

SerratedSharp commented 3 months ago

@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.

TonyValenti commented 3 months ago

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

TonyValenti commented 3 months ago

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

yohanespradono commented 1 week ago

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