Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Expose static methods from System.OperatingSystem - #8935

#8935
Merged
JaynieBai merged 20 commits into
dotnet:maindotnet/msbuild:mainfrom
jrdodds:AvailableStaticMethodsSystemOperatingSystemjrdodds/msbuild:AvailableStaticMethodsSystemOperatingSystemCopy head branch name to clipboard
Jul 6, 2023
Merged

Expose static methods from System.OperatingSystem#8935
JaynieBai merged 20 commits into
dotnet:maindotnet/msbuild:mainfrom
jrdodds:AvailableStaticMethodsSystemOperatingSystemjrdodds/msbuild:AvailableStaticMethodsSystemOperatingSystemCopy head branch name to clipboard

Conversation

@jrdodds

@jrdodds jrdodds commented Jun 22, 2023

Copy link
Copy Markdown
Contributor

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

Comment thread src/Build/Resources/Constants.cs Outdated
Comment thread src/Build/Resources/Constants.cs Outdated
Comment thread src/Build/Resources/Constants.cs
Comment thread src/Framework.UnitTests/OperatingSystem_Tests.cs Outdated
Comment thread src/Framework/OperatingSystem.cs Outdated
Comment thread src/Framework/OperatingSystem.cs Outdated
Comment thread src/Build.UnitTests/Evaluation/Expander_Tests.cs Outdated
Comment thread src/Framework/OperatingSystem.cs Outdated
Comment thread src/Framework/OperatingSystem.cs Outdated
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
Comment thread src/Build.UnitTests/Evaluation/Expander_Tests.cs

@akoeplinger akoeplinger left a comment

Copy link
Copy Markdown
Member

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!

Comment thread src/Build/Resources/Constants.cs Outdated

@rainersigwald rainersigwald left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

Comment thread src/MSBuild.UnitTests/XMake_Tests.cs Outdated
@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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.