diff --git a/src/CoreFx.Private.TestUtilities/dir.props b/src/CoreFx.Private.TestUtilities/dir.props
new file mode 100644
index 000000000000..04794ecf658c
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/dir.props
@@ -0,0 +1,8 @@
+
+
+
+
+ 1.0.0.0
+ Test
+
+
\ No newline at end of file
diff --git a/src/CoreFx.Private.TestUtilities/ref/Configurations.props b/src/CoreFx.Private.TestUtilities/ref/Configurations.props
new file mode 100644
index 000000000000..c398e42e8994
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/ref/Configurations.props
@@ -0,0 +1,8 @@
+
+
+
+
+ netstandard;
+
+
+
\ No newline at end of file
diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs
new file mode 100644
index 000000000000..cdb6977322fd
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs
@@ -0,0 +1,57 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.IO;
+using System.Threading.Tasks;
+using System.Runtime.CompilerServices;
+
+namespace System.Diagnostics
+{
+ public abstract partial class RemoteExecutorTestBase : System.IO.FileCleanupTestBase
+ {
+ public const int FailWaitTimeoutMilliseconds = 60000;
+ protected static readonly string HostRunner;
+ protected static readonly string HostRunnerName;
+ public const int SuccessExitCode = 42;
+ protected static readonly string TestConsoleApp;
+ protected RemoteExecutorTestBase() { }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg1, string arg2, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg1, string arg2, string arg3, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg1, string arg2, string arg3, string arg4, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg1, string arg2, string arg3, string arg4, string arg5, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func> method, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvokeRaw(System.Delegate method, string unparsedArg, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public sealed partial class RemoteInvokeHandle : System.IDisposable
+ {
+ public RemoteInvokeHandle(System.Diagnostics.Process process, System.Diagnostics.RemoteInvokeOptions options) { }
+ public System.Diagnostics.RemoteInvokeOptions Options { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public System.Diagnostics.Process Process { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
+ public void Dispose() { }
+ }
+ }
+ public sealed partial class RemoteInvokeOptions
+ {
+ public RemoteInvokeOptions() { }
+ public bool CheckExitCode { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public bool EnableProfiling { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public bool Start { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public System.Diagnostics.ProcessStartInfo StartInfo { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ public int TimeOut { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
+ }
+}
+namespace System.IO
+{
+ public abstract partial class FileCleanupTestBase : System.IDisposable
+ {
+ protected FileCleanupTestBase() { }
+ protected string TestDirectory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
+ public void Dispose() { }
+ protected virtual void Dispose(bool disposing) { }
+ ~FileCleanupTestBase() { }
+ protected string GetTestFileName(System.Nullable index=default(System.Nullable), [System.Runtime.CompilerServices.CallerMemberNameAttribute]string memberName=null, [System.Runtime.CompilerServices.CallerLineNumberAttribute]int lineNumber=0) { throw null; }
+ protected string GetTestFilePath(System.Nullable index=default(System.Nullable), [System.Runtime.CompilerServices.CallerMemberNameAttribute]string memberName=null, [System.Runtime.CompilerServices.CallerLineNumberAttribute]int lineNumber=0) { throw null; }
+ }
+}
\ No newline at end of file
diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.csproj b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.csproj
new file mode 100644
index 000000000000..ed421724cf1c
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.csproj
@@ -0,0 +1,14 @@
+
+
+
+
+ {E2E59C98-998F-9965-991D-99411166AF6F}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CoreFx.Private.TestUtilities/src/Configurations.props b/src/CoreFx.Private.TestUtilities/src/Configurations.props
new file mode 100644
index 000000000000..c25540e0321b
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/src/Configurations.props
@@ -0,0 +1,12 @@
+
+
+
+
+ uapaot-Windows_NT;
+ uap-Windows_NT;
+ netfx-Windows_NT;
+ netcoreapp-Windows_NT;
+ netcoreapp-Unix;
+
+
+
\ No newline at end of file
diff --git a/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj
new file mode 100644
index 000000000000..05cb43af2a40
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/src/CoreFx.Private.TestUtilities.csproj
@@ -0,0 +1,58 @@
+
+
+
+
+ CoreFx.Private.TestUtilities
+ {5B7EAEC-93CB-40DF-BE40-A60BC189B737}
+ $(ProjectDir)\external\test-runtime\XUnit.Runtime.depproj
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
new file mode 100644
index 000000000000..01c731be23ac
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.IO;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Threading.Tasks;
+using Xunit;
+
+namespace System.Diagnostics
+{
+ /// Base class used for all tests that need to spawn a remote process.
+ public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase
+ {
+ /// Invokes the method from this assembly in another process using the specified arguments.
+ /// The method to invoke.
+ /// The arguments to pass to the method.
+ /// true if this function should Start the Process; false if that responsibility is left up to the caller.
+ /// The ProcessStartInfo to use, or null for a default.
+ private static RemoteInvokeHandle RemoteInvoke(MethodInfo method, string[] args, RemoteInvokeOptions options)
+ {
+ options = options ?? new RemoteInvokeOptions();
+
+ // Verify the specified method is and that it returns an int (the exit code),
+ // and that if it accepts any arguments, they're all strings.
+ Assert.True(method.ReturnType == typeof(int) || method.ReturnType == typeof(Task));
+ Assert.All(method.GetParameters(), pi => Assert.Equal(typeof(string), pi.ParameterType));
+
+ // And make sure it's in this assembly. This isn't critical, but it helps with deployment to know
+ // that the method to invoke is available because we're already running in this assembly.
+ Type t = method.DeclaringType;
+ Assembly a = t.GetTypeInfo().Assembly;
+
+ // Start the other process and return a wrapper for it to handle its lifetime and exit checking.
+ var psi = options.StartInfo;
+ psi.UseShellExecute = false;
+
+ if (!options.EnableProfiling)
+ {
+ // Profilers / code coverage tools doing coverage of the test process set environment
+ // variables to tell the targeted process what profiler to load. We don't want the child process
+ // to be profiled / have code coverage, so we remove these environment variables for that process
+ // before it's started.
+ psi.Environment.Remove("Cor_Profiler");
+ psi.Environment.Remove("Cor_Enable_Profiling");
+ psi.Environment.Remove("CoreClr_Profiler");
+ psi.Environment.Remove("CoreClr_Enable_Profiling");
+ }
+
+ // If we need the host (if it exists), use it, otherwise target the console app directly.
+ string testConsoleAppArgs = "\"" + a.FullName + "\" " + t.FullName + " " + method.Name + " " + string.Join(" ", args);
+
+ if (!File.Exists(TestConsoleApp))
+ throw new IOException("RemoteExecutorConsoleApp test app isn't present in the test runtime directory.");
+
+ psi.FileName = HostRunner;
+ psi.Arguments = ExtraParameter + testConsoleAppArgs;
+
+ // Return the handle to the process, which may or not be started
+ return new RemoteInvokeHandle(options.Start ?
+ Process.Start(psi) :
+ new Process() { StartInfo = psi }, options);
+ }
+ }
+}
diff --git a/src/Common/tests/System/Diagnostics/RemoteExecutorTestBase.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs
similarity index 52%
rename from src/Common/tests/System/Diagnostics/RemoteExecutorTestBase.cs
rename to src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs
index 60d203b63ee9..f6178afa5bd6 100644
--- a/src/Common/tests/System/Diagnostics/RemoteExecutorTestBase.cs
+++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs
@@ -3,45 +3,30 @@
// See the LICENSE file in the project root for more information.
using System.IO;
+using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Xunit;
-#if uap
-using Windows.ApplicationModel;
-using Windows.ApplicationModel.AppService;
-using Windows.Foundation.Collections;
-#endif // uap
-
namespace System.Diagnostics
{
/// Base class used for all tests that need to spawn a remote process.
- public abstract class RemoteExecutorTestBase : FileCleanupTestBase
+ public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase
{
- /// The name of the test console app.
- protected static readonly string TestConsoleApp = "RemoteExecutorConsoleApp.exe";
- /// The name, without an extension, of the host used to host the test console app.
- private static readonly string HostRunnerExecutableName = IsFullFramework ? "xunit.console" : IsNetNative ? "xunit.console.netcore" : "dotnet";
- /// The name, with an extension, of the host host used to host the test console app.
- protected static readonly string HostRunnerName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? HostRunnerExecutableName + ".exe" : HostRunnerExecutableName;
- /// The absolute path to the host runner executable.
- protected static string HostRunner => Process.GetCurrentProcess().MainModule.FileName;
-
/// A timeout (milliseconds) after which a wait on a remote operation should be considered a failure.
public const int FailWaitTimeoutMilliseconds = 60 * 1000;
/// The exit code returned when the test process exits successfully.
- internal const int SuccessExitCode = 42;
+ public const int SuccessExitCode = 42;
- /// Determines if we're running on the .NET Framework (rather than .NET Core).
- internal static bool IsFullFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase);
+ /// The name of the test console app.
+ protected static readonly string TestConsoleApp = "RemoteExecutorConsoleApp.exe";
- internal static bool IsNetNative => RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.OrdinalIgnoreCase);
/// Invokes the method from this assembly in another process using the specified arguments.
/// The method to invoke.
/// Options to use for the invocation.
- internal static RemoteInvokeHandle RemoteInvoke(
+ public static RemoteInvokeHandle RemoteInvoke(
Func method,
RemoteInvokeOptions options = null)
{
@@ -51,7 +36,7 @@ internal static RemoteInvokeHandle RemoteInvoke(
/// Invokes the method from this assembly in another process using the specified arguments.
/// The method to invoke.
/// Options to use for the invocation.
- internal static RemoteInvokeHandle RemoteInvoke(
+ public static RemoteInvokeHandle RemoteInvoke(
Func> method,
RemoteInvokeOptions options = null)
{
@@ -62,7 +47,7 @@ internal static RemoteInvokeHandle RemoteInvoke(
/// The method to invoke.
/// The first argument to pass to the method.
/// Options to use for the invocation.
- internal static RemoteInvokeHandle RemoteInvoke(
+ public static RemoteInvokeHandle RemoteInvoke(
Func method,
string arg,
RemoteInvokeOptions options = null)
@@ -75,7 +60,7 @@ internal static RemoteInvokeHandle RemoteInvoke(
/// The first argument to pass to the method.
/// The second argument to pass to the method.
/// Options to use for the invocation.
- internal static RemoteInvokeHandle RemoteInvoke(
+ public static RemoteInvokeHandle RemoteInvoke(
Func method,
string arg1, string arg2,
RemoteInvokeOptions options = null)
@@ -89,7 +74,7 @@ internal static RemoteInvokeHandle RemoteInvoke(
/// The second argument to pass to the method.
/// The third argument to pass to the method.
/// Options to use for the invocation.
- internal static RemoteInvokeHandle RemoteInvoke(
+ public static RemoteInvokeHandle RemoteInvoke(
Func method,
string arg1, string arg2, string arg3,
RemoteInvokeOptions options = null)
@@ -104,7 +89,7 @@ internal static RemoteInvokeHandle RemoteInvoke(
/// The third argument to pass to the method.
/// The fourth argument to pass to the method.
/// Options to use for the invocation.
- internal static RemoteInvokeHandle RemoteInvoke(
+ public static RemoteInvokeHandle RemoteInvoke(
Func method,
string arg1, string arg2, string arg3, string arg4,
RemoteInvokeOptions options = null)
@@ -120,7 +105,7 @@ internal static RemoteInvokeHandle RemoteInvoke(
/// The fourth argument to pass to the method.
/// The fifth argument to pass to the method.
/// Options to use for the invocation.
- internal static RemoteInvokeHandle RemoteInvoke(
+ public static RemoteInvokeHandle RemoteInvoke(
Func method,
string arg1, string arg2, string arg3, string arg4, string arg5,
RemoteInvokeOptions options = null)
@@ -132,130 +117,12 @@ internal static RemoteInvokeHandle RemoteInvoke(
/// The method to invoke.
/// The arguments to pass to the method.
/// Options to use for the invocation.
- internal static RemoteInvokeHandle RemoteInvokeRaw(Delegate method, string unparsedArg,
+ public static RemoteInvokeHandle RemoteInvokeRaw(Delegate method, string unparsedArg,
RemoteInvokeOptions options = null)
{
return RemoteInvoke(GetMethodInfo(method), new[] { unparsedArg }, options);
}
-#if uap
- /// Invokes the method from this assembly in another process using the specified arguments.
- /// The method to invoke.
- /// The arguments to pass to the method.
- /// true if this function should Start the Process; false if that responsibility is left up to the caller.
- /// The ProcessStartInfo to use, or null for a default.
- private static RemoteInvokeHandle RemoteInvoke(MethodInfo method, string[] args, RemoteInvokeOptions options)
- {
- options = options ?? new RemoteInvokeOptions();
-
- // Verify the specified method is and that it returns an int (the exit code),
- // and that if it accepts any arguments, they're all strings.
- Assert.True(method.ReturnType == typeof(int) || method.ReturnType == typeof(Task));
- Assert.All(method.GetParameters(), pi => Assert.Equal(typeof(string), pi.ParameterType));
-
- // And make sure it's in this assembly. This isn't critical, but it helps with deployment to know
- // that the method to invoke is available because we're already running in this assembly.
- Type t = method.DeclaringType;
- Assembly a = t.GetTypeInfo().Assembly;
- Assert.Equal(typeof(RemoteExecutorTestBase).GetTypeInfo().Assembly, a);
-
- using (AppServiceConnection remoteExecutionService = new AppServiceConnection())
- {
- // Here, we use the app service name defined in the app service provider's Package.appxmanifest file in the section.
- remoteExecutionService.AppServiceName = "com.microsoft.corefxuaptests";
- remoteExecutionService.PackageFamilyName = Package.Current.Id.FamilyName;
-
- AppServiceConnectionStatus status = remoteExecutionService.OpenAsync().GetAwaiter().GetResult();
- if (status != AppServiceConnectionStatus.Success)
- {
- throw new IOException($"RemoteInvoke cannot open the remote service. Open Service Status: {status}");
- }
-
- ValueSet message = new ValueSet();
-
- message.Add("AssemblyName", a.FullName);
- message.Add("TypeName", t.FullName);
- message.Add("MethodName", method.Name);
-
- int i = 0;
- foreach (string arg in args)
- {
- message.Add("Arg" + i, arg);
- i++;
- }
-
- AppServiceResponse response = remoteExecutionService.SendMessageAsync(message).GetAwaiter().GetResult();
-
- Assert.True(response.Status == AppServiceResponseStatus.Success, $"response.Status = {response.Status}");
- int res = (int) response.Message["Results"];
- Assert.True(res == SuccessExitCode, (string) response.Message["Log"] + Environment.NewLine + $"Returned Error code: {res}");
- }
-
- // RemoteInvokeHandle is not really needed in the UAP scenario but we use it just to have consistent interface as non UAP
- return new RemoteInvokeHandle(null, options);
- }
-#else
-
- /// Invokes the method from this assembly in another process using the specified arguments.
- /// The method to invoke.
- /// The arguments to pass to the method.
- /// true if this function should Start the Process; false if that responsibility is left up to the caller.
- /// The ProcessStartInfo to use, or null for a default.
- private static RemoteInvokeHandle RemoteInvoke(MethodInfo method, string[] args, RemoteInvokeOptions options)
- {
- options = options ?? new RemoteInvokeOptions();
-
- // Verify the specified method is and that it returns an int (the exit code),
- // and that if it accepts any arguments, they're all strings.
- Assert.True(method.ReturnType == typeof(int) || method.ReturnType == typeof(Task));
- Assert.All(method.GetParameters(), pi => Assert.Equal(typeof(string), pi.ParameterType));
-
- // And make sure it's in this assembly. This isn't critical, but it helps with deployment to know
- // that the method to invoke is available because we're already running in this assembly.
- Type t = method.DeclaringType;
- Assembly a = t.GetTypeInfo().Assembly;
- Assert.Equal(typeof(RemoteExecutorTestBase).GetTypeInfo().Assembly, a);
-
- // Start the other process and return a wrapper for it to handle its lifetime and exit checking.
- var psi = options.StartInfo;
- psi.UseShellExecute = false;
-
- if (!options.EnableProfiling)
- {
- // Profilers / code coverage tools doing coverage of the test process set environment
- // variables to tell the targeted process what profiler to load. We don't want the child process
- // to be profiled / have code coverage, so we remove these environment variables for that process
- // before it's started.
- psi.Environment.Remove("Cor_Profiler");
- psi.Environment.Remove("Cor_Enable_Profiling");
- psi.Environment.Remove("CoreClr_Profiler");
- psi.Environment.Remove("CoreClr_Enable_Profiling");
- }
-
- // If we need the host (if it exists), use it, otherwise target the console app directly.
- string testConsoleAppArgs = "\"" + a.FullName + "\" " + t.FullName + " " + method.Name + " " + string.Join(" ", args);
-
- if (!File.Exists(TestConsoleApp))
- throw new IOException("RemoteExecutorConsoleApp test app isn't present in the test runtime directory.");
-
- if (IsFullFramework || IsNetNative)
- {
- psi.FileName = TestConsoleApp;
- psi.Arguments = testConsoleAppArgs;
- }
- else
- {
- psi.FileName = HostRunner;
- psi.Arguments = TestConsoleApp + " " + testConsoleAppArgs;
- }
-
- // Return the handle to the process, which may or not be started
- return new RemoteInvokeHandle(options.Start ?
- Process.Start(psi) :
- new Process() { StartInfo = psi }, options);
- }
-#endif
-
private static MethodInfo GetMethodInfo(Delegate d)
{
// RemoteInvoke doesn't support marshaling state on classes associated with
@@ -279,7 +146,7 @@ private static MethodInfo GetMethodInfo(Delegate d)
}
/// A cleanup handle to the Process created for the remote invocation.
- internal sealed class RemoteInvokeHandle : IDisposable
+ public sealed class RemoteInvokeHandle : IDisposable
{
public RemoteInvokeHandle(Process process, RemoteInvokeOptions options)
{
@@ -321,7 +188,7 @@ public void Dispose()
}
/// Options used with RemoteInvoke.
- internal sealed class RemoteInvokeOptions
+ public sealed class RemoteInvokeOptions
{
public bool Start { get; set; } = true;
public ProcessStartInfo StartInfo { get; set; } = new ProcessStartInfo();
diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netcore.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netcore.cs
new file mode 100644
index 000000000000..fb2fe31cad16
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netcore.cs
@@ -0,0 +1,18 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.IO;
+using System.Runtime.InteropServices;
+
+namespace System.Diagnostics
+{
+ /// Base class used for all tests that need to spawn a remote process.
+ public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase
+ {
+ protected static readonly string HostRunnerName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet";
+ protected static readonly string HostRunner = Process.GetCurrentProcess().MainModule.FileName;
+
+ private static readonly string ExtraParameter = TestConsoleApp + " " ;
+ }
+}
diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netfx.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netfx.cs
new file mode 100644
index 000000000000..01f69914711b
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.netfx.cs
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.IO;
+
+namespace System.Diagnostics
+{
+ /// Base class used for all tests that need to spawn a remote process.
+ public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase
+ {
+ protected static readonly string HostRunnerName = "xunit.console.exe";
+ protected static readonly string HostRunner = TestConsoleApp;
+
+ private static readonly string ExtraParameter = "";
+ }
+}
diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uap.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uap.cs
new file mode 100644
index 000000000000..218a1267d86d
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uap.cs
@@ -0,0 +1,76 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Xunit;
+using System.IO;
+using System.Reflection;
+using System.Threading.Tasks;
+using Windows.ApplicationModel;
+using Windows.Foundation.Collections;
+using Windows.ApplicationModel.AppService;
+
+namespace System.Diagnostics
+{
+ /// Base class used for all tests that need to spawn a remote process.
+ public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase
+ {
+ protected static readonly string HostRunnerName = "xunit.runner.uap.exe";
+ protected static readonly string HostRunner = "xunit.runner.uap";
+
+ /// Invokes the method from this assembly in another process using the specified arguments.
+ /// The method to invoke.
+ /// The arguments to pass to the method.
+ /// true if this function should Start the Process; false if that responsibility is left up to the caller.
+ /// The ProcessStartInfo to use, or null for a default.
+ private static RemoteInvokeHandle RemoteInvoke(MethodInfo method, string[] args, RemoteInvokeOptions options)
+ {
+ options = options ?? new RemoteInvokeOptions();
+
+ // Verify the specified method is and that it returns an int (the exit code),
+ // and that if it accepts any arguments, they're all strings.
+ Assert.True(method.ReturnType == typeof(int) || method.ReturnType == typeof(Task));
+ Assert.All(method.GetParameters(), pi => Assert.Equal(typeof(string), pi.ParameterType));
+
+ // And make sure it's in this assembly. This isn't critical, but it helps with deployment to know
+ // that the method to invoke is available because we're already running in this assembly.
+ Type t = method.DeclaringType;
+ Assembly a = t.GetTypeInfo().Assembly;
+
+ using (AppServiceConnection remoteExecutionService = new AppServiceConnection())
+ {
+ // Here, we use the app service name defined in the app service provider's Package.appxmanifest file in the section.
+ remoteExecutionService.AppServiceName = "com.microsoft.corefxuaptests";
+ remoteExecutionService.PackageFamilyName = Package.Current.Id.FamilyName;
+
+ AppServiceConnectionStatus status = remoteExecutionService.OpenAsync().GetAwaiter().GetResult();
+ if (status != AppServiceConnectionStatus.Success)
+ {
+ throw new IOException($"RemoteInvoke cannot open the remote service. Open Service Status: {status}");
+ }
+
+ ValueSet message = new ValueSet();
+
+ message.Add("AssemblyName", a.FullName);
+ message.Add("TypeName", t.FullName);
+ message.Add("MethodName", method.Name);
+
+ int i = 0;
+ foreach (string arg in args)
+ {
+ message.Add("Arg" + i, arg);
+ i++;
+ }
+
+ AppServiceResponse response = remoteExecutionService.SendMessageAsync(message).GetAwaiter().GetResult();
+
+ Assert.True(response.Status == AppServiceResponseStatus.Success, $"response.Status = {response.Status}");
+ int res = (int) response.Message["Results"];
+ Assert.True(res == SuccessExitCode, (string) response.Message["Log"] + Environment.NewLine + $"Returned Error code: {res}");
+ }
+
+ // RemoteInvokeHandle is not really needed in the UAP scenario but we use it just to have consistent interface as non UAP
+ return new RemoteInvokeHandle(null, options);
+ }
+ }
+}
diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uapaot.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uapaot.cs
new file mode 100644
index 000000000000..adc0b6af273d
--- /dev/null
+++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.uapaot.cs
@@ -0,0 +1,18 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.IO;
+
+namespace System.Diagnostics
+{
+ /// Base class used for all tests that need to spawn a remote process.
+ public abstract partial class RemoteExecutorTestBase : FileCleanupTestBase
+ {
+ protected static readonly string HostRunnerName = "xunit.console.netcore.exe";
+ protected static readonly string HostRunner = TestConsoleApp;
+
+ private static readonly string ExtraParameter = "";
+ }
+
+}
diff --git a/src/Common/tests/System/IO/FileCleanupTestBase.cs b/src/CoreFx.Private.TestUtilities/src/System/IO/FileCleanupTestBase.cs
similarity index 100%
rename from src/Common/tests/System/IO/FileCleanupTestBase.cs
rename to src/CoreFx.Private.TestUtilities/src/System/IO/FileCleanupTestBase.cs
diff --git a/src/System.Console/tests/System.Console.Tests.csproj b/src/System.Console/tests/System.Console.Tests.csproj
index c10c8f5b28c1..7729b83ea5e9 100644
--- a/src/System.Console/tests/System.Console.Tests.csproj
+++ b/src/System.Console/tests/System.Console.Tests.csproj
@@ -40,12 +40,6 @@
Common\System\IO\InterceptStreamWriter.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\ShouldNotBeInvokedException.cs
diff --git a/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj b/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj
index 162185615edb..77e2f7f2778b 100644
--- a/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj
+++ b/src/System.Data.SqlClient/tests/FunctionalTests/System.Data.SqlClient.Tests.csproj
@@ -31,12 +31,6 @@
Common\System\AssertExtensions.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\PlatformDetection.cs
diff --git a/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj b/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj
index 2fbd944ab56c..86316971ef75 100644
--- a/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj
+++ b/src/System.Diagnostics.DiagnosticSource/tests/System.Diagnostics.DiagnosticSource.Tests.csproj
@@ -35,12 +35,6 @@
Common\System\Net\Configuration.Http.cs
-
- Common\System\IO\FileCleanupTestBase.cs
-
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
\ No newline at end of file
diff --git a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj
index 6f695af0374e..16c061f977c0 100644
--- a/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj
+++ b/src/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/System.Diagnostics.FileVersionInfo.Tests.csproj
@@ -27,9 +27,6 @@
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\PlatformDetection.cs
diff --git a/src/System.Diagnostics.Process/tests/Configurations.props b/src/System.Diagnostics.Process/tests/Configurations.props
index f333d20c1aaa..c71f0fb5ae98 100644
--- a/src/System.Diagnostics.Process/tests/Configurations.props
+++ b/src/System.Diagnostics.Process/tests/Configurations.props
@@ -4,6 +4,7 @@
netstandard-Windows_NT;
netstandard-Unix;
+ uap-Windows_NT;
\ No newline at end of file
diff --git a/src/System.Diagnostics.Process/tests/Performance/System.Diagnostics.Process.Performance.Tests.csproj b/src/System.Diagnostics.Process/tests/Performance/System.Diagnostics.Process.Performance.Tests.csproj
index be629d40721f..0bb7bb2f7593 100644
--- a/src/System.Diagnostics.Process/tests/Performance/System.Diagnostics.Process.Performance.Tests.csproj
+++ b/src/System.Diagnostics.Process/tests/Performance/System.Diagnostics.Process.Performance.Tests.csproj
@@ -10,12 +10,6 @@
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
diff --git a/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj b/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj
index fd1e907a95cd..d441671781fd 100644
--- a/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj
+++ b/src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests.csproj
@@ -11,7 +11,9 @@
-
+
+
+
Common\System\AssertExtensions.cs
@@ -21,12 +23,6 @@
Common\System\PlatformDetection.Unix.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\ShouldNotBeInvokedException.cs
diff --git a/src/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj b/src/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj
index e7197d9e270b..58badc80b58b 100644
--- a/src/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj
+++ b/src/System.Diagnostics.TraceSource/tests/System.Diagnostics.TraceSource.Tests.csproj
@@ -34,9 +34,6 @@
Common\System\AssertExtensions.cs
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\tests\System\PlatformDetection.cs
diff --git a/src/System.Globalization/tests/System.Globalization.Tests.csproj b/src/System.Globalization/tests/System.Globalization.Tests.csproj
index f9f3b2125087..ff7eb68ae48c 100644
--- a/src/System.Globalization/tests/System.Globalization.Tests.csproj
+++ b/src/System.Globalization/tests/System.Globalization.Tests.csproj
@@ -143,22 +143,12 @@
Common\System\RandomDataGenerator.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
- {69e46a6f-9966-45a5-8945-2559fe337827}RemoteExecutorConsoleApp
-
-
-
-
CharUnicodeInfo\UnicodeData8.0.txt
diff --git a/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj b/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj
index 52213bf0dd1e..c61ecbcd7092 100644
--- a/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj
+++ b/src/System.IO.Compression.ZipFile/tests/System.IO.Compression.ZipFile.Tests.csproj
@@ -15,9 +15,6 @@
Common\System\AssertExtensions.cs
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\IO\TempFile.cs
diff --git a/src/System.IO.Compression/tests/System.IO.Compression.Tests.csproj b/src/System.IO.Compression/tests/System.IO.Compression.Tests.csproj
index cec2b8b3be1f..64e2dfde30c1 100644
--- a/src/System.IO.Compression/tests/System.IO.Compression.Tests.csproj
+++ b/src/System.IO.Compression/tests/System.IO.Compression.Tests.csproj
@@ -42,9 +42,6 @@
Common\System\IO\Compression\StreamHelpers.cs
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\IO\TempFile.cs
diff --git a/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj b/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj
index c97af90ff29c..f6ee7a174d16 100644
--- a/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj
+++ b/src/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj
@@ -40,9 +40,6 @@
Common\System\AssertExtensions.cs
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\IO\TempFile.cs
diff --git a/src/System.IO.FileSystem/tests/Performance/System.IO.FileSystem.Performance.Tests.csproj b/src/System.IO.FileSystem/tests/Performance/System.IO.FileSystem.Performance.Tests.csproj
index 85258bbfe6db..14a24cd377b9 100644
--- a/src/System.IO.FileSystem/tests/Performance/System.IO.FileSystem.Performance.Tests.csproj
+++ b/src/System.IO.FileSystem/tests/Performance/System.IO.FileSystem.Performance.Tests.csproj
@@ -23,15 +23,9 @@
Common\System\PerfUtils.cs
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\IO\PathFeatures.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
diff --git a/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj b/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
index d4fcb1c666ac..be391761c820 100644
--- a/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
+++ b/src/System.IO.FileSystem/tests/System.IO.FileSystem.Tests.csproj
@@ -158,9 +158,6 @@
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\IO\TempFile.cs
@@ -170,9 +167,6 @@
Common\System\PlatformDetection.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
Common\System\AssertExtensions.cs
diff --git a/src/System.IO.MemoryMappedFiles/tests/Performance/System.IO.MemoryMappedFiles.Performance.Tests.csproj b/src/System.IO.MemoryMappedFiles/tests/Performance/System.IO.MemoryMappedFiles.Performance.Tests.csproj
index b5eb4684a002..7d0243f7d15a 100644
--- a/src/System.IO.MemoryMappedFiles/tests/Performance/System.IO.MemoryMappedFiles.Performance.Tests.csproj
+++ b/src/System.IO.MemoryMappedFiles/tests/Performance/System.IO.MemoryMappedFiles.Performance.Tests.csproj
@@ -14,9 +14,6 @@
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\IO\StringBuilderCache.cs
diff --git a/src/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj b/src/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj
index f3f89a4c2f82..a18106f2fb7e 100644
--- a/src/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj
+++ b/src/System.IO.MemoryMappedFiles/tests/System.IO.MemoryMappedFiles.Tests.csproj
@@ -26,12 +26,6 @@
Common\System\IO\TempFile.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\AssertExtensions.cs
diff --git a/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj b/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj
index c109c85fd9d1..e2a2ecbbe051 100644
--- a/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj
+++ b/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj
@@ -8,9 +8,6 @@
-
- Common\System\IO\FileCleanupTestBase.cs
-
diff --git a/src/System.IO.Pipes.AccessControl/tests/System.IO.Pipes.AccessControl.Tests.csproj b/src/System.IO.Pipes.AccessControl/tests/System.IO.Pipes.AccessControl.Tests.csproj
index 0539a6885f4e..b531986ec2f2 100644
--- a/src/System.IO.Pipes.AccessControl/tests/System.IO.Pipes.AccessControl.Tests.csproj
+++ b/src/System.IO.Pipes.AccessControl/tests/System.IO.Pipes.AccessControl.Tests.csproj
@@ -11,12 +11,6 @@
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\PlatformDetection.cs
diff --git a/src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj b/src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj
index fec7b2d3c8df..33fc1ef8a171 100644
--- a/src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj
+++ b/src/System.IO.Pipes/tests/System.IO.Pipes.Tests.csproj
@@ -36,12 +36,6 @@
Common\System\AssertExtensions.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\PlatformDetection.cs
diff --git a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
index 67bb82b27479..b00fcf49668a 100644
--- a/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
+++ b/src/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj
@@ -23,18 +23,12 @@
Common\System\PlatformDetection.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
Common\System\Diagnostics\Tracing\TestEventListener.cs
Common\System\IO\DelegateStream.cs
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\Net\Configuration.Certificates.cs
diff --git a/src/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj b/src/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj
index 5ea28c39c447..1075c5a8beb3 100644
--- a/src/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj
+++ b/src/System.Net.Mail/tests/Functional/System.Net.Mail.Functional.Tests.csproj
@@ -28,12 +28,6 @@
Common\System\Diagnostics\Tracing\TestEventListener.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
diff --git a/src/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj b/src/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj
index 5321e59a4b39..c3be1073ea5a 100644
--- a/src/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj
+++ b/src/System.Net.Primitives/tests/FunctionalTests/System.Net.Primitives.Functional.Tests.csproj
@@ -36,12 +36,6 @@
Common\System\Diagnostics\Tracing\TestEventListener.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs
diff --git a/src/System.Net.Requests/tests/System.Net.Requests.Tests.csproj b/src/System.Net.Requests/tests/System.Net.Requests.Tests.csproj
index 57100724eb5d..f74fa454cca2 100644
--- a/src/System.Net.Requests/tests/System.Net.Requests.Tests.csproj
+++ b/src/System.Net.Requests/tests/System.Net.Requests.Tests.csproj
@@ -30,12 +30,6 @@
Common\System\Net\Http\LoopbackServer.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
- {69e46a6f-9966-45a5-8945-2559fe337827}RemoteExecutorConsoleApp
diff --git a/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj b/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
index 62134ea08a33..f0ddcc4fe139 100644
--- a/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
+++ b/src/System.Net.Security/tests/FunctionalTests/System.Net.Security.Tests.csproj
@@ -107,12 +107,6 @@
Common\System\Diagnostics\Tracing\TestEventListener.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
diff --git a/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj b/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
index 9ca5cf80771c..ac1cfd69d6ee 100644
--- a/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
+++ b/src/System.Net.Sockets/tests/FunctionalTests/System.Net.Sockets.Tests.csproj
@@ -98,12 +98,6 @@
Common\System\Diagnostics\Tracing\TestEventListener.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
diff --git a/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj b/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj
index b6f285207352..08dc8331926b 100644
--- a/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj
+++ b/src/System.Runtime.Extensions/tests/System.Runtime.Extensions.Tests.csproj
@@ -90,12 +90,6 @@
Common\System\AssertExtensions.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\IO\PathFeatures.cs
diff --git a/src/System.Runtime.Extensions/tests/System/Environment.Exit.cs b/src/System.Runtime.Extensions/tests/System/Environment.Exit.cs
index 29af52ccd7f6..0852b9787805 100644
--- a/src/System.Runtime.Extensions/tests/System/Environment.Exit.cs
+++ b/src/System.Runtime.Extensions/tests/System/Environment.Exit.cs
@@ -60,7 +60,7 @@ public static void ExitCode_VoidMainAppReturnsSetValue(int mode)
const string AppName = "VoidMainWithExitCodeApp.exe";
var psi = new ProcessStartInfo();
- if (IsFullFramework || IsNetNative)
+ if (PlatformDetection.IsFullFramework || PlatformDetection.IsNetNative)
{
psi.FileName = AppName;
psi.Arguments = $"{expectedExitCode} {mode}";
diff --git a/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj b/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
index 29c663616ca1..9eb51250bab5 100644
--- a/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
+++ b/src/System.Runtime.Serialization.Formatters/tests/System.Runtime.Serialization.Formatters.Tests.csproj
@@ -29,12 +29,6 @@
Common\System\NonRuntimeType.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
CommonTest\System\PlatformDetection.cs
diff --git a/src/System.Runtime/tests/System.Runtime.Tests.csproj b/src/System.Runtime/tests/System.Runtime.Tests.csproj
index 23234b7eab9f..8687ad8fc3bc 100644
--- a/src/System.Runtime/tests/System.Runtime.Tests.csproj
+++ b/src/System.Runtime/tests/System.Runtime.Tests.csproj
@@ -228,12 +228,6 @@
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
- {69e46a6f-9966-45a5-8945-2559fe337827}RemoteExecutorConsoleApp
diff --git a/src/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj b/src/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj
index 0f9f4a66213e..0f544cd5674a 100644
--- a/src/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj
+++ b/src/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj
@@ -15,12 +15,6 @@
Common\tests\System\PlatformDetection.cs
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
diff --git a/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj b/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj
index ef9b10eda34d..1c8adef64f90 100644
--- a/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj
+++ b/src/System.Threading.Tasks.Dataflow/tests/System.Threading.Tasks.Dataflow.Tests.csproj
@@ -24,12 +24,6 @@
-
- Common\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- Common\System\IO\FileCleanupTestBase.cs
-
Common\System\Diagnostics\Tracing\TestEventListener.cs
diff --git a/src/System.Threading/tests/System.Threading.Tests.csproj b/src/System.Threading/tests/System.Threading.Tests.csproj
index d7c76321b31e..6e437a3437c8 100644
--- a/src/System.Threading/tests/System.Threading.Tests.csproj
+++ b/src/System.Threading/tests/System.Threading.Tests.csproj
@@ -43,12 +43,6 @@
CommonTest\System\Diagnostics\Tracing\TestEventListener.cs
-
- CommonTest\System\Diagnostics\RemoteExecutorTestBase.cs
-
-
- CommonTest\System\IO\FileCleanupTestBase.cs
-
CommonTest\System\Threading\ThreadTestHelpers.cs