From af1b04e3fdd3807e861457324cf224d8274c3ca9 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 2 Apr 2019 21:16:06 +0200 Subject: [PATCH 1/7] Cross compile RemoteExecutor --- .../Microsoft.DotNet.RemoteExecutor.csproj | 7 ++++--- .../Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs | 5 ++++- .../Microsoft.DotNet.RemoteExecutorHost.csproj | 9 ++------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj index 4360e26f087..831361767bb 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netcoreapp2.0;net472;netstandard2.0 This package provides support for running tests out-of-process. true true @@ -23,8 +23,9 @@ - - + + + diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs index b2a49bf7e6c..3f05e955b76 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs @@ -19,7 +19,7 @@ public static partial class RemoteExecutor // The exit code returned when the test process exits successfully. public const int SuccessExitCode = 42; // The path of the remote executor. - public static readonly string Path = System.IO.Path.GetFullPath("Microsoft.DotNet.RemoteExecutorHost.dll"); + public static readonly string Path; // The name of the host public static string HostRunnerName; // The path of the host @@ -35,16 +35,19 @@ static RemoteExecutor() if (RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.OrdinalIgnoreCase) || PlatformDetection.IsInAppContainer) { // Host is required to have a remote execution feature integrated. Currently applies to uap and *aot. + Path = processFileName; HostRunner = HostRunnerName; s_extraParameter = "remote"; } else if (RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase)) { + Path = System.IO.Path.GetFullPath("Microsoft.DotNet.RemoteExecutorHost.dll"); HostRunner = processFileName; s_extraParameter = Path; } else if (RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)) { + Path = System.IO.Path.GetFullPath("Microsoft.DotNet.RemoteExecutorHost.exe"); HostRunner = Path; } else diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj index 05fffbe45dd..6b35bc848b3 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj @@ -1,19 +1,14 @@ - Exe - netstandard2.0 + netcoreapp2.0;net472;netstandard2.0 true false - + PreserveNewest From c453fef41cb3fbce2019538ed3ffa92cd893c0c6 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 9 Apr 2019 14:19:02 +0200 Subject: [PATCH 2/7] Remove host dependency for NS2.0 --- .../Microsoft.DotNet.RemoteExecutor.csproj | 6 ++++-- .../Microsoft.DotNet.RemoteExecutorHost.csproj | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj index 831361767bb..faa62ddc8d8 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj @@ -5,7 +5,7 @@ This package provides support for running tests out-of-process. true true - $(TargetsForTfmSpecificContentInPackage);PackBuildOutputs + $(TargetsForTfmSpecificContentInPackage);PackBuildOutputs @@ -13,7 +13,9 @@ - + diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj index 6b35bc848b3..a9ab111abaf 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.0;net472;netstandard2.0 + netcoreapp2.0;net472 true false From 5ba7e502a5c804bc0bec64a898d2d85ba4904bd4 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 12 Apr 2019 21:25:18 +0200 Subject: [PATCH 3/7] Move RemoteExecutorHost to tools dir --- .../Microsoft.DotNet.RemoteExecutor.csproj | 15 +++++++-------- .../RemoteExecutor.cs | 4 ++-- .../build/Microsoft.DotNet.RemoteExecutor.targets | 8 ++++++++ 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/build/Microsoft.DotNet.RemoteExecutor.targets diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj index faa62ddc8d8..2aa726fd0c9 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj @@ -13,21 +13,20 @@ - + - - + + + - - - + + + diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs index 3f05e955b76..ac37ba95c4d 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/RemoteExecutor.cs @@ -41,13 +41,13 @@ static RemoteExecutor() } else if (RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase)) { - Path = System.IO.Path.GetFullPath("Microsoft.DotNet.RemoteExecutorHost.dll"); + Path = System.IO.Path.Combine(AppContext.BaseDirectory, "Microsoft.DotNet.RemoteExecutorHost.dll"); HostRunner = processFileName; s_extraParameter = Path; } else if (RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)) { - Path = System.IO.Path.GetFullPath("Microsoft.DotNet.RemoteExecutorHost.exe"); + Path = System.IO.Path.Combine(AppContext.BaseDirectory, "Microsoft.DotNet.RemoteExecutorHost.exe"); HostRunner = Path; } else diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/build/Microsoft.DotNet.RemoteExecutor.targets b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/build/Microsoft.DotNet.RemoteExecutor.targets new file mode 100644 index 00000000000..8ba8a701d52 --- /dev/null +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/build/Microsoft.DotNet.RemoteExecutor.targets @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From ce873f0562decdd3a0e4b2da2d972da976e62208 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 15 Apr 2019 13:50:55 +0200 Subject: [PATCH 4/7] Upgrade to netcorapp2.1 runtimeconfig.json support was added in 2.1 --- .../Microsoft.DotNet.RemoteExecutor.csproj | 4 ++-- .../Microsoft.DotNet.RemoteExecutorHost.csproj | 4 ++-- .../Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj index 2aa726fd0c9..dc850ebef63 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;net472;netstandard2.0 + netcoreapp2.1;net472;netstandard2.0 This package provides support for running tests out-of-process. true true @@ -26,7 +26,7 @@ - + diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj index a9ab111abaf..c8eade9fa32 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj @@ -2,13 +2,13 @@ Exe - netcoreapp2.0;net472 + netcoreapp2.1;net472 true false - + PreserveNewest diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json index 85789d0655a..b50b3e9aa1c 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json @@ -1,10 +1,10 @@ { "runtimeOptions": { "rollForwardOnNoCandidateFx": 2, - "tfm": "netcoreapp2.0", + "tfm": "netcoreapp2.1", "framework": { "name": "Microsoft.NETCore.App", - "version": "2.0.0" + "version": "2.1.0" } } } From cc1f632f40853d14b3776049920803c2886d0dd3 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 23 Apr 2019 13:36:50 +0200 Subject: [PATCH 5/7] Use ReferenceOutputAssembly false --- .../Microsoft.DotNet.RemoteExecutor.csproj | 22 ++++++++++++++----- .../Microsoft.DotNet.RemoteExecutor.targets | 2 +- ...Microsoft.DotNet.RemoteExecutorHost.csproj | 6 ----- ...tNet.RemoteExecutorHost.runtimeconfig.json | 10 --------- .../runtimeconfig.template.json | 3 +++ 5 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json create mode 100644 src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/runtimeconfig.template.json diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj index dc850ebef63..9a24e59ada4 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj @@ -5,7 +5,7 @@ This package provides support for running tests out-of-process. true true - $(TargetsForTfmSpecificContentInPackage);PackBuildOutputs + $(TargetsForTfmSpecificContentInPackage);PackBuildOutputs @@ -13,7 +13,11 @@ - + @@ -23,10 +27,16 @@ - - - - + + + + + + + + + + diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/build/Microsoft.DotNet.RemoteExecutor.targets b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/build/Microsoft.DotNet.RemoteExecutor.targets index 8ba8a701d52..4ef8ee528ea 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/build/Microsoft.DotNet.RemoteExecutor.targets +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/build/Microsoft.DotNet.RemoteExecutor.targets @@ -3,6 +3,6 @@ - + \ No newline at end of file diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj index c8eade9fa32..c1545067ad5 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.csproj @@ -7,10 +7,4 @@ false - - - PreserveNewest - - - diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json deleted file mode 100644 index b50b3e9aa1c..00000000000 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/Microsoft.DotNet.RemoteExecutorHost.runtimeconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "runtimeOptions": { - "rollForwardOnNoCandidateFx": 2, - "tfm": "netcoreapp2.1", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "2.1.0" - } - } -} diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/runtimeconfig.template.json b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/runtimeconfig.template.json new file mode 100644 index 00000000000..f022b7ffce1 --- /dev/null +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutorHost/runtimeconfig.template.json @@ -0,0 +1,3 @@ +{ + "rollForwardOnNoCandidateFx": 2 +} \ No newline at end of file From 73b2d668739e1f6354f1022f344d6b60261f49f7 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 23 Apr 2019 13:47:53 +0200 Subject: [PATCH 6/7] Remove hardcoded paths --- .../Microsoft.DotNet.RemoteExecutor.csproj | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj index 9a24e59ada4..9cf43977ef0 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj @@ -27,16 +27,21 @@ + + + - + - + From 20c7deaabb75d6dc5e361e4861685853f39b57b4 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 23 Apr 2019 15:17:19 +0200 Subject: [PATCH 7/7] Pack target depends --- .../Microsoft.DotNet.RemoteExecutor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj index 9cf43977ef0..83850d4e810 100644 --- a/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj +++ b/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor/Microsoft.DotNet.RemoteExecutor.csproj @@ -26,7 +26,7 @@ - +