diff --git a/build.psm1 b/build.psm1 index bf4eaf4088..8941e27723 100644 --- a/build.psm1 +++ b/build.psm1 @@ -884,10 +884,11 @@ function Publish-NuGetFeed function Start-DevPowerShell { param( + [switch]$FullCLR, [switch]$ZapDisable, [string[]]$ArgumentList = '', [switch]$LoadProfile, - [string]$binDir = (Split-Path (New-PSOptions -FullCLR).Output), + [string]$binDir = (Split-Path (New-PSOptions -FullCLR:$FullCLR).Output), [switch]$NoNewWindow, [string]$Command, [switch]$KeepPSModulePath @@ -918,7 +919,7 @@ function Start-DevPowerShell { $env:COMPLUS_ZapDisable = 1 } - if (-not (Test-Path $binDir\powershell.exe.config)) { + if ($FullCLR -and (-not (Test-Path $binDir\powershell.exe.config))) { $configContents = @" @@ -932,7 +933,7 @@ function Start-DevPowerShell { # splatting for the win $startProcessArgs = @{ - FilePath = "$binDir\powershell.exe" + FilePath = "$binDir\powershell" ArgumentList = "$ArgumentList" } diff --git a/docs/building/windows-full.md b/docs/building/windows-full.md index f9c7e23fcf..6a07e257e7 100644 --- a/docs/building/windows-full.md +++ b/docs/building/windows-full.md @@ -92,20 +92,20 @@ Assembly Cache (GAC), not your output directory. Use `Start-DevPowerShell` helper funciton, to workaround it with `$env:DEVPATH` ```powershell -Start-DevPowerShell +Start-DevPowerShell -FullCLR ``` This command has a reasonable default to run `powershell.exe` from the build output folder. If you are building an unusual configuration (i.e. not `Debug`), you can explicitly specify path to the bin directory ```powershell -Start-DevPowerShell -binDir .\src\Microsoft.PowerShell.ConsoleHost\bin\Debug\net451 +Start-DevPowerShell -FullCLR -binDir .\src\Microsoft.PowerShell.ConsoleHost\bin\Debug\net451 ``` Or more programmatically: ```powershell -Start-DevPowerShell -binDir (Split-Path -Parent (Get-PSOutput)) +Start-DevPowerShell -FullCLR -binDir (Split-Path -Parent (Get-PSOutput)) ``` The default for produced `powershell.exe` is x64.