toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.51k stars 260 forks source link

Please do a nuget release for 2.0.0-beta1 #228

Closed kinetiq closed 5 years ago

kinetiq commented 5 years ago

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!

AudriusMasiulionis commented 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.

kinetiq commented 5 years ago

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

toddams commented 5 years ago

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 :)

kinetiq commented 5 years ago

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

Aracturat commented 5 years ago

@toddams Can we hope for new release by the end of october?

kinetiq commented 5 years ago

@toddams Just checking in on this, as October is over. Even a nuget release of the beta would probably be good. Thanks man.

molinch commented 5 years ago

@toddams Could we get a new Nuget release as this would fix a couple of issues? Thanks a lot!

wakuflair commented 5 years ago

@toddams Sorry but we're waiting for a new release.

kinetiq commented 5 years ago

@toddams Any update on this? I believe in you todd!

h0useRus commented 5 years ago

@toddams is this project still supported?

kinetiq commented 5 years ago

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.