Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
951 stars 601 forks source link

Added support for detecting .NET 5.0+ as .NET Core #1313

Closed dseller closed 2 years ago

dseller commented 2 years ago

Since .NET 5.0, the version string in RuntimeInformation.FrameworkDescription no longer starts with .NET Core, but rather .NET <version number>. This fix inverts the .NET Core check, by checking that the version string does not start with .NET Framework. This way, future .NET (Core) versions will also be detected correctly.

See https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.runtimeinformation.frameworkdescription?view=net-5.0

Resolves #1316, Resolves #1252

ericvana commented 2 years ago

Hi,

We are using .NET 6, and this PR would help us as well !

samisq commented 2 years ago

We're running into the same issue while upgrading to .NET 6. Would love to see this PR merged, if possible.

microalps commented 2 years ago

Resolves #1316, Resolves #1252

@dseller including that in your comments will link the PR to those tasks.

milkshakeuk commented 2 years ago

Is anyone picking this up? its blocking our dotnet 6 upgrade.

milkshakeuk commented 2 years ago

@AndersAbel do you know if anything is happening with this?

dseller commented 2 years ago

After creating this PR, I noticed that there are multiple other PRs already where this issue has been addressed going back over a year. It seems the maintainer does not want to implement these fixes.

My personal recommendation would be to fork the project and apply the PR in your fork. That's what we did.

AndersAbel commented 2 years ago

I'm merging this now to develop and v2 branches. I will close the other PRs. I will release a 2.9.0 with this change, and other urgent changes.

samisq commented 2 years ago

@AndersAbel Thank you for merging the fix. Do you have a timeline on when 2.9.0 will be released? Or would it be possible to publish a pre-release version?

AndersAbel commented 2 years ago

My intention was a couple of days ago, but got swamped by other work. Tomorrow looks like a good day.

dseller commented 2 years ago

Thank you @AndersAbel, that would mean we can get rid of our own temporary fork. Great!