diff --git a/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/Program.cs b/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/Program.cs index c8c70ec5c0d..a55eb98c2ff 100644 --- a/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/Program.cs +++ b/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/Program.cs @@ -5,6 +5,9 @@ using System.Windows.Forms; using WinformsControlsTest; +// Set STAThread +Thread.CurrentThread.SetApartmentState(ApartmentState.Unknown); +Thread.CurrentThread.SetApartmentState(ApartmentState.STA); ApplicationConfiguration.Initialize(); Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);