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

Expose static methods from System.OperatingSystem #8935

Merged

Conversation

jrdodds
Copy link
Contributor

@jrdodds jrdodds commented Jun 22, 2023

Fixes #5982

Context

Expose methods added in .Net 5.0. Create alternate stand-in for net471.

Changes Made

  • Add Microsoft.Build.Framework.OperatingSystem as stand-in substitute for net471. The class assumes that only Windows is supported.
  • Add unit tests for Microsoft.Build.Framework.OperatingSystem.
  • Modify Constants.cs to static methods either from System.OperatingSystem or from Microsoft.Build.Framework.OperatingSystem.
  • Add unit tests for IsOSPlatform property function

Testing

Tested on windows 11 and macOS 12. tested by running full suite of unit test.

Notes

jrdodds and others added 6 commits June 22, 2023 09:39
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
@rainersigwald rainersigwald added this to the VS 17.8 milestone Jun 22, 2023
Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me apart from one comment. Thank you!

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JaynieBai JaynieBai merged commit bc97bd0 into dotnet:main Jul 6, 2023
@jrdodds jrdodds deleted the AvailableStaticMethodsSystemOperatingSystem branch July 6, 2023 12:45
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

Successfully merging this pull request may close these issues.

Expose OperatingSystem APIs as intrinsic property functions
4 participants