diff --git a/eng/testing/tests.ioslike.targets b/eng/testing/tests.ioslike.targets index 24de43e2a24225..c1ea8a9e5e82aa 100644 --- a/eng/testing/tests.ioslike.targets +++ b/eng/testing/tests.ioslike.targets @@ -13,6 +13,7 @@ Static true <_SuppressNativeLibEventSourceWarning>true + true diff --git a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs index 2af27adacbe6d0..ef38eea9823e21 100644 --- a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs +++ b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.cs @@ -17,14 +17,14 @@ using Microsoft.DotNet.XHarness.TestRunners.Common; using Microsoft.DotNet.XHarness.TestRunners.Xunit; -public class SimpleTestRunner : iOSApplicationEntryPoint, IDevice +public partial class SimpleTestRunner : iOSApplicationEntryPoint, IDevice { // to be wired once https://github.com/dotnet/xharness/pull/46 is merged - [DllImport("__Internal")] - public extern static void mono_ios_append_output (string value); + [LibraryImport("__Internal", EntryPoint = "mono_ios_append_output", StringMarshalling = StringMarshalling.Utf8)] + private static partial void mono_ios_append_output (string value); - [DllImport("__Internal")] - public extern static void mono_ios_set_summary (string value); + [LibraryImport("__Internal", EntryPoint = "mono_ios_set_summary", StringMarshalling = StringMarshalling.Utf8)] + private static partial void mono_ios_set_summary (string value); private static List s_testLibs = new List(); private static List? s_testAssemblies; diff --git a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj index 4f33bc8b4a5655..c993673026325a 100644 --- a/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj +++ b/src/libraries/Common/tests/AppleTestRunner/AppleTestRunner.csproj @@ -2,6 +2,7 @@ Exe enable + true $(NetCoreAppCurrent)