Skip specifying the project argument when running dotnet commands

Workaround for https://github.com/dotnet/cli/issues/5168 and https://github.com/dotnet/cli/issues/5211
This commit is contained in:
Pranav K 2017-01-05 17:42:45 -08:00
parent 2aff751547
commit ac8a86ff3f
2 changed files with 4 additions and 3 deletions

View File

@ -45,7 +45,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
DeploymentParameters.PublishedApplicationRootPath = publishRoot ?? Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
var parameters = $"publish \"{DeploymentParameters.ApplicationPath}\""
var parameters = $"publish "
+ $" --output \"{DeploymentParameters.PublishedApplicationRootPath}\""
+ $" --framework {DeploymentParameters.TargetFramework}"
+ $" --configuration {DeploymentParameters.Configuration}";
@ -59,7 +59,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardError = true,
RedirectStandardOutput = true
RedirectStandardOutput = true,
WorkingDirectory = DeploymentParameters.ApplicationPath,
};
AddEnvironmentVariablesToProcess(startInfo, DeploymentParameters.PublishEnvironmentVariables);

View File

@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
var targetFramework = DeploymentParameters.TargetFramework ?? (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1");
executableName = DotnetCommandName;
executableArgs = $"run -p \"{DeploymentParameters.ApplicationPath}\" --framework {targetFramework} {DotnetArgumentSeparator}";
executableArgs = $"run --framework {targetFramework} {DotnetArgumentSeparator}";
}
executableArgs += $" --server.urls {uri} "