RemoteWindowsDeployer: Changing current working directory to the app output folder

This commit is contained in:
Kiran Challa 2017-03-08 17:15:02 -08:00
parent c8003c0305
commit 0846e13b06
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,10 @@ elseif (($serverType -eq "Kestrel") -or ($serverType -eq "WebListener"))
[Environment]::SetEnvironmentVariable("PATH", "$dotnetRuntimePath")
}
# Change the current working directory to the deployed folder to make applications work
# when they use API like Directory.GetCurrentDirectory()
cd -Path $deployedFolderPath
$command = $executablePath + " " + $executableParameters + " --server.urls " + $applicationBaseUrl
if ($serverType -eq "Kestrel")
{