PowerShell Build Instructions/build module seem incomplete #1246

Closed
opened 2026-01-30 22:20:08 +00:00 by claunia · 5 comments
Owner

Originally created by @nlowe on GitHub (May 22, 2019).

I just installed 1903 so I wanted to take another pass at building this again. After getting the latest master (git pull origin master && git submodule update --init --recursive) I tried following the powershell build steps in the README.

I can import ./tools/OpenConsole.psm1 just fine:

C:\Users\Nathan\projects\Terminal [master ]
λ  Import-Module .\tools\OpenConsole.psm1 -Verbose
VERBOSE: Importing function 'Debug-OpenConsole'.
VERBOSE: Importing function 'Invoke-OpenConsoleBuild'.
VERBOSE: Importing function 'Invoke-OpenConsoleTests'.
VERBOSE: Importing function 'Set-MsbuildDevEnvironment'.
VERBOSE: Importing function 'Start-OpenConsole'.

However, Set-MsbuildDevEnvironment seems broken or assumes some specific folder structure:

C:\Users\Nathan\projects\Terminal [master ]
λ  Set-MsbuildDevEnvironment
pushd : The path 'C:\..\..' referred to an item that was outside the base 'C:'.
At C:\Users\Nathan\projects\Terminal\tools\OpenConsole.psm1:11 char:5
+     pushd $path
+     ~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Push-Location], PSArgumentException
    + FullyQualifiedErrorId : System.Management.Automation.PSArgumentException,Microsoft.PowerShell.Commands.PushLocationCom
   mand

pushd : The path 'C:\..\..' referred to an item that was outside the base 'C:'.
At C:\Users\Nathan\projects\Terminal\tools\OpenConsole.psm1:11 char:5
+     pushd $path
+     ~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Push-Location], PSArgumentException
    + FullyQualifiedErrorId : System.Management.Automation.PSArgumentException,Microsoft.PowerShell.Commands.PushLocationCom
   mand

'vcvarsall.bat' is not recognized as an internal or external command,
operable program or batch file.
Dev environment variables set

However, Invoke-OpenConsoleBuild seems to pass just fine (after forcing the platform to x64). Can these warnings be ignored? Is this a bug with the tool module?

Originally created by @nlowe on GitHub (May 22, 2019). I just installed 1903 so I wanted to take another pass at building this again. After getting the latest `master` (`git pull origin master && git submodule update --init --recursive`) I tried following the powershell build steps in the README. I can import `./tools/OpenConsole.psm1` just fine: ```powershell C:\Users\Nathan\projects\Terminal [master ≡] λ Import-Module .\tools\OpenConsole.psm1 -Verbose VERBOSE: Importing function 'Debug-OpenConsole'. VERBOSE: Importing function 'Invoke-OpenConsoleBuild'. VERBOSE: Importing function 'Invoke-OpenConsoleTests'. VERBOSE: Importing function 'Set-MsbuildDevEnvironment'. VERBOSE: Importing function 'Start-OpenConsole'. ``` However, `Set-MsbuildDevEnvironment` seems broken or assumes some specific folder structure: ```powershell C:\Users\Nathan\projects\Terminal [master ≡] λ Set-MsbuildDevEnvironment pushd : The path 'C:\..\..' referred to an item that was outside the base 'C:'. At C:\Users\Nathan\projects\Terminal\tools\OpenConsole.psm1:11 char:5 + pushd $path + ~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Push-Location], PSArgumentException + FullyQualifiedErrorId : System.Management.Automation.PSArgumentException,Microsoft.PowerShell.Commands.PushLocationCom mand pushd : The path 'C:\..\..' referred to an item that was outside the base 'C:'. At C:\Users\Nathan\projects\Terminal\tools\OpenConsole.psm1:11 char:5 + pushd $path + ~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Push-Location], PSArgumentException + FullyQualifiedErrorId : System.Management.Automation.PSArgumentException,Microsoft.PowerShell.Commands.PushLocationCom mand 'vcvarsall.bat' is not recognized as an internal or external command, operable program or batch file. Dev environment variables set ``` However, `Invoke-OpenConsoleBuild` seems to pass just fine (after forcing the platform to `x64`). Can these warnings be ignored? Is this a bug with the tool module?
claunia added the Help WantedIssue-DocsProduct-MetaArea-Build labels 2026-01-30 22:20:08 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 22, 2019):

Summoning @adiviness who wrote these

@zadjii-msft commented on GitHub (May 22, 2019): Summoning @adiviness who wrote these
Author
Owner

@adiviness commented on GitHub (May 22, 2019):

Yeah, setting the dev environment in the powershell module is a bit hacky. I have a branch somewhere that improves it by searching more directories but I've been told about a tool that does all that for you. I think it was called vswhere?

@adiviness commented on GitHub (May 22, 2019): Yeah, setting the dev environment in the powershell module is a bit hacky. I have a branch somewhere that improves it by searching more directories but I've been told about a tool that does all that for you. I think it was called vswhere?
Author
Owner

@DHowett-MSFT commented on GitHub (May 30, 2019):

This is now the meta-issue tracking making OpenConsole.psm1 better. Congrats!

@DHowett-MSFT commented on GitHub (May 30, 2019): This is now the meta-issue tracking making `OpenConsole.psm1` better. Congrats!
Author
Owner

@DHowett-MSFT commented on GitHub (May 30, 2019):

Also: use vswhere. :P

@DHowett-MSFT commented on GitHub (May 30, 2019): Also: use vswhere. :P
Author
Owner

@strega-nil commented on GitHub (May 30, 2019):

It's a pretty easy thing to fix, I'll see if I can do something for it later today.

@strega-nil commented on GitHub (May 30, 2019): It's a pretty easy thing to fix, I'll see if I can do something for it later today.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1246