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:
parent
2aff751547
commit
ac8a86ff3f
|
|
@ -45,7 +45,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
||||||
|
|
||||||
DeploymentParameters.PublishedApplicationRootPath = publishRoot ?? Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
|
DeploymentParameters.PublishedApplicationRootPath = publishRoot ?? Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
|
||||||
|
|
||||||
var parameters = $"publish \"{DeploymentParameters.ApplicationPath}\""
|
var parameters = $"publish "
|
||||||
+ $" --output \"{DeploymentParameters.PublishedApplicationRootPath}\""
|
+ $" --output \"{DeploymentParameters.PublishedApplicationRootPath}\""
|
||||||
+ $" --framework {DeploymentParameters.TargetFramework}"
|
+ $" --framework {DeploymentParameters.TargetFramework}"
|
||||||
+ $" --configuration {DeploymentParameters.Configuration}";
|
+ $" --configuration {DeploymentParameters.Configuration}";
|
||||||
|
|
@ -59,7 +59,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
CreateNoWindow = true,
|
CreateNoWindow = true,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
RedirectStandardOutput = true
|
RedirectStandardOutput = true,
|
||||||
|
WorkingDirectory = DeploymentParameters.ApplicationPath,
|
||||||
};
|
};
|
||||||
|
|
||||||
AddEnvironmentVariablesToProcess(startInfo, DeploymentParameters.PublishEnvironmentVariables);
|
AddEnvironmentVariablesToProcess(startInfo, DeploymentParameters.PublishEnvironmentVariables);
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
|
||||||
var targetFramework = DeploymentParameters.TargetFramework ?? (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1");
|
var targetFramework = DeploymentParameters.TargetFramework ?? (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1");
|
||||||
|
|
||||||
executableName = DotnetCommandName;
|
executableName = DotnetCommandName;
|
||||||
executableArgs = $"run -p \"{DeploymentParameters.ApplicationPath}\" --framework {targetFramework} {DotnetArgumentSeparator}";
|
executableArgs = $"run --framework {targetFramework} {DotnetArgumentSeparator}";
|
||||||
}
|
}
|
||||||
|
|
||||||
executableArgs += $" --server.urls {uri} "
|
executableArgs += $" --server.urls {uri} "
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue