-
Notifications
You must be signed in to change notification settings - Fork 53
Fix: Replace RuntimeInformation dependency with Environment.Version for .NET 8+ #275
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
Fix: Replace RuntimeInformation dependency with Environment.Version for .NET 8+ #275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revisit the UT and ensure the new and existing functionality is being tested properly.
Thanks for the feedback, Laura. I've updated the test to directly call UserAgentHelper.GetFrameworkDescription. The part (".NET Core foo", "foo/Microsoft.NETCore.App") wasn't necessary, as my goal was to test the FrameworkDescription based on .NET versions. The updated test now achieves that. I also ensured that all other tests are passing to confirm that the existing functionality is intact. Please let me know if you think any further changes are needed. |
51614ab
to
ffd8b44
Compare
ffd8b44
to
a80050f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thank you for making these changes, @aniket-okta!
The next step will be releasing a patch and updating the abstractions dependency in both ASP.NET SDKs 🚀
This pull request addresses an issue related to the use of RuntimeInformation.FrameworkDescription in the UserAgentHelper class of the Okta.AspNet.Abstractions library. The change replaces the dependency on RuntimeInformation with Environment.Version for projects targeting .NET 5 and above. The goal is to reduce unnecessary dependencies, especially in modern .NET versions, by utilizing Environment.Version to obtain framework version details.
Changes Made:
Testing Done:
Related Issues:
-#274