Invoke-OpenConsoleBuild fails if msbuild.exe isn't in path #1370

Closed
opened 2026-01-30 22:23:49 +00:00 by claunia · 2 comments
Owner

Originally created by @mikemaccana on GitHub (May 26, 2019).

~\Downloads\Terminal $ Invoke-OpenConsoleBuild
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin'.
All packages listed in packages.config are already installed.
msbuild.exe : The term 'msbuild.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\mikem\Downloads\Terminal\tools\OpenConsole.psm1:183 char:5
+     msbuild.exe "$env:OpenConsoleRoot\OpenConsole.sln" @args
+     ~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (msbuild.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

~\Downloads\Terminal $ Add-PathVariable 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\'                                                                                                                      

~\Downloads\Terminal $ Invoke-OpenConsoleBuild
MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin'.
All packages listed in packages.config are already installed.
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 5/26/2019 11:36:38 PM.
Project "C:\Users\mikem\Downloads\Terminal\OpenConsole.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|ARM64".
Originally created by @mikemaccana on GitHub (May 26, 2019). ``` ~\Downloads\Terminal $ Invoke-OpenConsoleBuild MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin'. All packages listed in packages.config are already installed. msbuild.exe : The term 'msbuild.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\mikem\Downloads\Terminal\tools\OpenConsole.psm1:183 char:5 + msbuild.exe "$env:OpenConsoleRoot\OpenConsole.sln" @args + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (msbuild.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException ~\Downloads\Terminal $ Add-PathVariable 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\' ~\Downloads\Terminal $ Invoke-OpenConsoleBuild MSBuild auto-detection: using msbuild version '15.9.21.664' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin'. All packages listed in packages.config are already installed. Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved. Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. Build started 5/26/2019 11:36:38 PM. Project "C:\Users\mikem\Downloads\Terminal\OpenConsole.sln" on node 1 (default targets). ValidateSolutionConfiguration: Building solution configuration "Debug|ARM64". ```
Author
Owner

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

did you run Set-MsbuildDevEnvironment first?

@adiviness commented on GitHub (May 28, 2019): did you run `Set-MsbuildDevEnvironment` first?
Author
Owner

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

Moving to #930

@DHowett-MSFT commented on GitHub (May 30, 2019): Moving to #930
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1370