Closed kinetiq closed 5 years ago
It seems the author has abandoned this project. Not really sure if I can use this in production code if it's no longer maintained.
I hope @toddams will weigh in on that, it's such a popular project.
What's the best alternative? I see that there's now a .NET Core version of RazorEngine in this fork: https://github.com/hermanho/RazorEngine/tree/updateToNetCore
Most of the critical bugs are fixed and changes are already in master. Project is not abandoned, but is temporary frozen because of my real life problems. Most of them are solved so I expect to deliver a new release by the end of this month.
I had a small hope on contributions from the community, but seems like it is not the case. Either should I document it better, or encourage you to help me out with this project :)
@toddams Thanks for the response. It's a great project! It does seem like it would take some work to get involved in it however. I will look forward to the release!
@toddams Can we hope for new release by the end of october?
@toddams Just checking in on this, as October is over. Even a nuget release of the beta would probably be good. Thanks man.
@toddams Could we get a new Nuget release as this would fix a couple of issues? Thanks a lot!
@toddams Sorry but we're waiting for a new release.
@toddams Any update on this? I believe in you todd!
@toddams is this project still supported?
Wow, I see that you actually did a nuget release for 2.0.0-beta1 but you didn't update this ticket. That is extremely unfortunate... I only noticed because I finally gave up and replaced the package. :(
Now I'm using this: https://github.com/aspnet/Entropy/blob/master/samples/Mvc.RenderViewToString/RazorViewToStringRenderer.cs
Just have to register:
services.AddTransient<RazorViewToStringRenderer>();
...And it seems to work like a charm:
var text = RazorRenderer.RenderViewToStringAsync<ActivateRespondentVM>("/Controllers/EmailTemplates/Views/ActivateRespondent.cshtml", mode);
...Where ActivateRespondentVM is the type of my model.
I'm sure the people who maintain this project must be aware of this. Is there some downside to this approach? It seems really easy and reliable, and works with .cshtml files that are compiled into the DLL.
Could you please do a nuget release for 2.0.0-beta1? As you may know, you can do the release and mark it as prerelease so that it only shows up on for people are looking for it and willing to take a risk.
I've been told to get rid of PreserveCompilationContex / MvcRazorCompileOnPublish since it's having a negative effect on initial load time after deploy, and rendering from string would be a fantastic way to do that. So it's this or switch to a different tool for rendering emails.
Thanks for the great project!