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

"Official" support for .NET 8 #32

Closed
dannybucks opened this issue Aug 14, 2024 · 1 comment
Closed

"Official" support for .NET 8 #32

dannybucks opened this issue Aug 14, 2024 · 1 comment
Assignees

Comments

@dannybucks
Copy link

I upgraded to .NET 8 and Lib.Net.Http.WebPush and Lib.AspNetCore.WebPush works well!
However, according to the NuGet Gallary it does not officiall support .NET 8: https://www.nuget.org/packages/Lib.AspNetCore.WebPush#dependencies-body-tab
Are there any plans to upgrade officially?

A notice:
Function Apps: InProcess Function Apps won't be supported from end of 2026. The new thing is isolated Function Apps and these no longer use WebJobs, so your Function App WebPush project needs some ajustments to. I found, that the official upgrade guide suggests to add Microsoft.AspNetCore.App: https://learn.microsoft.com/en-us/azure/azure-functions/migrate-dotnet-to-isolated-model?tabs=net8
I'm using your library in a Function App and was able to use the normal Lib.AspNetCore.WebPush by adding

services.AddPushServiceClient(options =>
{
IConfigurationSection pushNotificationServiceConfigurationSection = configuration.GetSection(nameof(PushServiceClient));

            options.Subject = pushNotificationServiceConfigurationSection.GetValue<string>(nameof(options.Subject));
            options.PublicKey = pushNotificationServiceConfigurationSection.GetValue<string>(nameof(options.PublicKey));
            options.PrivateKey = pushNotificationServiceConfigurationSection.GetValue<string>(nameof(options.PrivateKey));
        });

to the Program (isolated Function Apps no longer use a Startup class) and everythings worked great.

So, it seems, this is only a matter of documentation.

@tpeczek tpeczek self-assigned this Aug 14, 2024
@tpeczek
Copy link
Owner

tpeczek commented Aug 14, 2024

Hi @dannybucks,

Thank you for reaching out (and using my stuff 😉).

Regarding the .NET 8 "official" support, my approach based from past experiences from this and my other libraries is to add the new framework version to the test suite (this has been done here: 5f91cf5). If there are issues, I fix them and release a new version. If there are no issues, I include the new target framework with the next release that is bringing any actual changes to the library (and I didn't had a reason to release new version of this library past year). I do it like this, because I have learned that releases with only new target frameworks are causing confusion to many consumer and in fact doesn't bring any significant value. Also NuGet does list the new target frameworks as officially compatible under the Frameworks tab (https://www.nuget.org/packages/Lib.AspNetCore.WebPush#supportedframeworks-body-tab).

The Functions App subject is a little bit more tricky. Simple answer is that I haven't made my mind about what to do with it yet. To provide the same level of support for the isolated worker model as I currently provide for the in-process model, I should create a dedicated isolated worker model extension (https://www.tpeczek.com/2024/03/azure-functions-extensibility.html) as I did for one of my other libraries (https://github.com/tpeczek/dotnet-server-timing). The trick is, that I haven't determined if there is a demand for it (as you have noticed, the functionality can be achieved without the extension). At this point I've decided to create some issues to track the effort, but they are not a declaration that I will certainly go that path 😉 (happy to get to know your thoughts):

@tpeczek tpeczek closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants