diff --git a/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs b/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs index da535fafea8e79..00bcc3869bf298 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs +++ b/src/libraries/System.ServiceProcess.ServiceController/tests/ServiceBaseTests.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.DotNet.XUnitExtensions; using System.Diagnostics; using Xunit; @@ -141,6 +142,11 @@ public void TestOnPauseAndContinueThenStop() [ConditionalFact(nameof(IsProcessElevated))] public void TestOnExecuteCustomCommand() { + if (PlatformDetection.IsWindowsServerCore) + { + throw new SkipTestException("Skip on Windows Server Core"); // https://github.com/dotnet/runtime/issues/43207 + } + ServiceController controller = ConnectToServer(); controller.ExecuteCommand(128);