Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for .NET 8.0, consider removing deprecated .NET versions #538

Open
JohnCampionJr opened this issue Nov 19, 2023 · 11 comments
Open

Update for .NET 8.0, consider removing deprecated .NET versions #538

JohnCampionJr opened this issue Nov 19, 2023 · 11 comments

Comments

@JohnCampionJr
Copy link

It would be good to update this to directly support .net8.0.

Should also consider removing support for pre .net6.0 versions (core 3.1, net5.0)

Happy to submit a PR to do this, but wanted to check first.

@BC89
Copy link

BC89 commented Dec 20, 2023

Not that .net8 is LTS this would be awesome.

@A9G-Data-Droid
Copy link

NET8 brings a new way to render razor pages

So this could result in a major back end overhaul to a new Microsoft supported workflow.

@blackholeearth
Copy link

İ hope thşs doesn't remove .net 4.6 2 support.

Win7 forever....

@GaryWayneSmith
Copy link

İ hope thşs doesn't remove .net 4.6 2 support.

Win7 forever....

We have a lot of legacy apps using .Net 4.6.2. We are migrating libs over to dual .Net Framework 4.6.2/Standard 2.1 so we can do new projects with some shared functionality. I'm using the old RazorEngine that's been dead for a while. A lot of open-source developers seem dumping old .Net framework stuff which I think is bad for legacy apps that have been stable for years.

I have two libraries that I can no longer update because the next nuget update is incompatible (for no reason at all as I can download their source, just change it to Standard 2.0, and recompile (with maybe a minor conditional change).

I hope this project doesn't go that route as we're starting to use this as a replacement for the former engine.

@A9G-Data-Droid
Copy link

İ hope thşs doesn't remove .net 4.6 2 support.

Win7 forever....

I'm not sure why you would use 4.6 when 4.8, .NET5, and .NET6 were all supported on Windows 7. The OS itself is out of support and yet it still works. The same can be said for running .NET8 on Windows 7. It isn't supported but it might work. Really depends on what libraries you end up using.

dotnet/core#7556

@jzabroski
Copy link
Collaborator

RazorLight should no longer really be needed now that NET8 brings a new way to render razor pages, as @A9G-Data-Droid noted.

@jzabroski
Copy link
Collaborator

What would you all still use RazorLight for?

@ktb-dev
Copy link

ktb-dev commented Jul 6, 2024

NET8 brings a new way to render razor pages

@A9G-Data-Droid , @jzabroski
could you tell me how to render a template obtained from the database using a new way?

@jzabroski
Copy link
Collaborator

RazorLightEngine would just call the HtmlRenderer in net8.0 in an InvokeAsync context, as the linked sample suggests. Open to a PR that uses

#if NET8_0_OR_GREATER

#endif

Some review of caching may be required as Im not sure how the new approach by Microsoft disposes of compiled resources if the template changes a lot.

@nm-a
Copy link
Contributor

nm-a commented Sep 2, 2024

Hi @jzabroski

I feel it is better to have new branch which targets >= .NET 8 with new nuget package version

@betsu-nega
Copy link

betsu-nega commented Sep 5, 2024

RazorLightEngine would just call the HtmlRenderer in net8.0 in an InvokeAsync context, as the linked sample suggests. Open to a PR that uses

#if NET8_0_OR_GREATER

#endif

Some review of caching may be required as Im not sure how the new approach by Microsoft disposes of compiled resources if the template changes a lot.

I think the new way only supports rendering 'Razor Components'. It doesn't support rendering 'html' or 'string' templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants