-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
hosting windows service helper enhancement #93771
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-hosting Issue Detailsfixes #93613
|
src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/WindowsServiceHelpers.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/WindowsServiceHelpers.cs
Outdated
Show resolved
Hide resolved
I wonder if we can convert |
Not sure how it affects trimming but, using if (
#if NETFRAMEWORK
Environment.OSVersion.Platform != PlatformID.Win32NT
#elif NET5_0_OR_GREATER
!OperatingSystem.IsWindows()
#else
!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
#endif
)
{
return false;
} |
using OperatingSystem for net 5.0 or greater
align code style with dotnet#93771
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!
* Update SystemdHelpers.cs align code style with #93771 * Update SystemdHelpers.cs revert OperationSystem condition change * remove partial on SystemdHelpers
fixes #93613