From 8ab10c52a95778298fbd93842f7733bd3c97a937 Mon Sep 17 00:00:00 2001 From: Mike Richmond Date: Mon, 18 Jul 2016 15:04:45 -0700 Subject: [PATCH] Positioning powershell.exe in Microsoft.PowerShell.ConsoleHost for consumption by Start-DevPowerShell --- build.psm1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.psm1 b/build.psm1 index 5e508fa95..f4e35281a 100644 --- a/build.psm1 +++ b/build.psm1 @@ -247,6 +247,14 @@ cmd.exe /C cd /d "$location" "&" "$($vcVarsPath)\vcvarsall.bat" "$NativeHostArch log " Executing command: $command" Start-NativeExecution { Invoke-Expression -Command:$command } } + + # Copy the executable binary from the local build directory to the expected destination to enable Start-DevPowerShell to work + # + # TODO: This should be updated to handle per-architecture builds gracefully. + $srcPath = Join-Path (Join-Path (Join-Path (Get-Location) "bin") $msbuildConfiguration) "FullCLR/powershell.exe" + $dstPath = ($script:Options).Top + log " Copying $srcPath to $dstPath" + Copy-Item $srcPath $dstPath } finally { Pop-Location }