Set deployed application root folder as working directory
This commit is contained in:
parent
3a3405cf43
commit
e96f2cb738
|
|
@ -50,8 +50,10 @@ namespace Microsoft.AspNetCore.Server.Testing
|
||||||
{
|
{
|
||||||
string executableName;
|
string executableName;
|
||||||
string executableArgs = string.Empty;
|
string executableArgs = string.Empty;
|
||||||
|
string workingDirectory = string.Empty;
|
||||||
if (DeploymentParameters.PublishApplicationBeforeDeployment)
|
if (DeploymentParameters.PublishApplicationBeforeDeployment)
|
||||||
{
|
{
|
||||||
|
workingDirectory = DeploymentParameters.PublishedApplicationRootPath;
|
||||||
var executableExtension =
|
var executableExtension =
|
||||||
DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? ".exe" :
|
DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? ".exe" :
|
||||||
DeploymentParameters.ApplicationType == ApplicationType.Portable ? ".dll" : "";
|
DeploymentParameters.ApplicationType == ApplicationType.Portable ? ".dll" : "";
|
||||||
|
|
@ -74,6 +76,7 @@ namespace Microsoft.AspNetCore.Server.Testing
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
workingDirectory = DeploymentParameters.ApplicationPath;
|
||||||
var targetFramework = DeploymentParameters.TargetFramework ?? (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0");
|
var targetFramework = DeploymentParameters.TargetFramework ?? (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0");
|
||||||
|
|
||||||
executableName = DotnetCommandName;
|
executableName = DotnetCommandName;
|
||||||
|
|
@ -94,7 +97,8 @@ namespace Microsoft.AspNetCore.Server.Testing
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
// Trying a work around for https://github.com/aspnet/Hosting/issues/140.
|
// Trying a work around for https://github.com/aspnet/Hosting/issues/140.
|
||||||
RedirectStandardInput = true
|
RedirectStandardInput = true,
|
||||||
|
WorkingDirectory = workingDirectory
|
||||||
};
|
};
|
||||||
|
|
||||||
AddEnvironmentVariablesToProcess(startInfo);
|
AddEnvironmentVariablesToProcess(startInfo);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue