From 78877b6ba2d134408d55d0dc3b1464b9b3845cd4 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 13 Jun 2017 10:39:58 -0700 Subject: [PATCH] Add "--no-restore" parameter to "dotnet run" (#1104) - Workaround for "Publish fails on app with project reference to netstandard2.0 class library" (https://github.com/dotnet/cli/issues/6843) --- .../Deployers/SelfHostDeployer.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs index c9a09b46b8..83800ba225 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs @@ -96,7 +96,14 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting var targetFramework = DeploymentParameters.TargetFramework ?? (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "net461" : "netcoreapp2.0"); executableName = DotnetCommandName; - executableArgs = $"run --framework {targetFramework} {DotnetArgumentSeparator}"; + 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 += $" --server.urls {hintUrl} "