From 9f49d34c17ee7d55273bfe13cf7c6c3e014b36e9 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 14 Jun 2017 19:52:54 -0700 Subject: [PATCH 1/3] Revert "Workaround: On xplat machines, provided executable permission to published standalone application executable" This reverts commit 51f77ea7f3b4a704691d0def9dd746fe0e32d5dc. --- .../Deployers/SelfHostDeployer.cs | 60 ------------------- 1 file changed, 60 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs index 83800ba225..2ab172b830 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs @@ -39,9 +39,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting if (DeploymentParameters.PublishApplicationBeforeDeployment) { DotnetPublish(); - - // Temporary workaround for https://github.com/dotnet/cli/issues/6286 - ProvideExecutePermission(); } var hintUrl = TestUriHelper.BuildTestUri(DeploymentParameters.ApplicationBaseUriHint); @@ -199,62 +196,5 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting StopTimer(); } } - - // Temporary workaround for https://github.com/dotnet/cli/issues/6286 - private void ProvideExecutePermission() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) - && DeploymentParameters.RuntimeFlavor == RuntimeFlavor.CoreClr - && DeploymentParameters.ApplicationType == ApplicationType.Standalone) - { - var executablePath = Path.Combine( - DeploymentParameters.PublishedApplicationRootPath, - DeploymentParameters.ApplicationName); - - var chmodProcessStartInfo = new ProcessStartInfo - { - FileName = "chmod", - Arguments = $"755 {executablePath}", - UseShellExecute = false, - CreateNoWindow = true, - RedirectStandardOutput = true, - RedirectStandardError = true - }; - - var chmodProcess = new Process() { StartInfo = chmodProcessStartInfo }; - try - { - chmodProcess.StartAndCaptureOutAndErrToLogger("chmod", Logger); - } - catch (Exception ex) - { - Logger.LogError( - "Error occurred while starting the process '{processName}'. Exception: {exception}", - chmodProcessStartInfo.FileName, - ex.ToString()); - } - - var hasExited = chmodProcess.WaitForExit(3 * 1000); - - if (hasExited) - { - if (chmodProcess.ExitCode != 0) - { - Logger.LogError( - "Process {processName} with id {pid} exited with code {exitCode} or failed to start.", - chmodProcessStartInfo.FileName, - HostProcess.Id, - HostProcess.ExitCode); - } - } - else - { - Logger.LogError( - "Process {processName} with id {pid} did not exit in the given amount of time.", - chmodProcessStartInfo.FileName, - HostProcess.Id); - } - } - } } } From 0b90376bbf10c5a1ef1bccd44697595216e99ab0 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 14 Jun 2017 20:06:03 -0700 Subject: [PATCH 2/3] Revert "Add "--no-restore" parameter to "dotnet run" (#1104)" This reverts commit 78877b6ba2d134408d55d0dc3b1464b9b3845cd4. --- .../Deployers/SelfHostDeployer.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs index 2ab172b830..782e96969c 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs @@ -93,14 +93,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting var targetFramework = DeploymentParameters.TargetFramework ?? (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0"); executableName = DotnetCommandName; - executableArgs = $"run --framework {targetFramework}"; - - // Workaround for: - // Publish fails on app with project reference to netstandard2.0 class library - // https://github.com/dotnet/cli/issues/6843 - executableArgs += " --no-restore"; - - executableArgs += $" {DotnetArgumentSeparator}"; + executableArgs = $"run --framework {targetFramework} {DotnetArgumentSeparator}"; } executableArgs += $" --server.urls {hintUrl} " From 53128bca0ee1a86160980ea7a2e2281736303222 Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Wed, 14 Jun 2017 20:06:11 -0700 Subject: [PATCH 3/3] Revert "Add "--no-restore" parameter to "dotnet publish" (#1101)" This reverts commit 007e3b6b51028a468e902e7ba3f747454cfd1cb2. --- .../Deployers/ApplicationDeployer.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs index d41ba1637a..6ec210ba07 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/ApplicationDeployer.cs @@ -56,11 +56,6 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting + $" --framework {DeploymentParameters.TargetFramework}" + $" --configuration {DeploymentParameters.Configuration}"; - // Workaround for: - // Publish fails on app with project reference to netstandard2.0 class library - // https://github.com/dotnet/cli/issues/6843 - parameters += " --no-restore"; - if (DeploymentParameters.ApplicationType == ApplicationType.Standalone) { parameters += $" --runtime {GetRuntimeIdentifier()}";