msbuild.exe is not recognized as the name of a cmdlet, function, script file, or operable program. #2095

Closed
opened 2026-01-30 22:46:39 +00:00 by claunia · 4 comments
Owner

Originally created by @Pcoric on GitHub (Jun 24, 2019).

Environment

Windows build number: [run "ver" at a command prompt] Microsoft Windows [Version 10.0.17763.557]
Windows Terminal version (if applicable): v0.2.1715.0

Any other software?

Steps to reproduce

Running the installation commands from vs 2019 preview. I am doing it in PowerShell, although I also tried in CMD and got errors at the bcz step. Import-Module .\tools\OpenConsole.psm1 &
Set-MsBuildDevEnvironment both worked for me.

NOTE: Found what seemed like a similar issue at #930 but I am using the merged update. I think I may just need to give up trying to do it with 2019, but I'm still filing this as a bug hoping someone will explain to me why the version is causing this issue if I'm just running PowerShell commands.

Expected behavior

I'd expect the Invoke-OpenConsoleBuild command to complete successfully, it's giving me an error.

Actual behavior

Build is failing: 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\pacoric\source\repos\terminal\tools\OpenConsole.psm1:251 char:5

  • msbuild.exe "$env:OpenConsoleRoot\OpenConsole.sln" @args
    
  • ~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (msbuild.exe:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
Originally created by @Pcoric on GitHub (Jun 24, 2019). <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run "ver" at a command prompt] Microsoft Windows [Version 10.0.17763.557] Windows Terminal version (if applicable): v0.2.1715.0 Any other software? ``` # Steps to reproduce Running the installation commands from vs 2019 preview. I am doing it in PowerShell, although I also tried in CMD and got errors at the bcz step. Import-Module .\tools\OpenConsole.psm1 & Set-MsBuildDevEnvironment both worked for me. NOTE: Found what seemed like a similar issue at #930 but I am using the merged update. I think I may just need to give up trying to do it with 2019, but I'm still filing this as a bug hoping someone will explain to me why the version is causing this issue if I'm just running PowerShell commands. # Expected behavior I'd expect the Invoke-OpenConsoleBuild command to complete successfully, it's giving me an error. # Actual behavior <!-- What's actually happening? --> Build is failing: 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\pacoric\source\repos\terminal\tools\OpenConsole.psm1:251 char:5 + msbuild.exe "$env:OpenConsoleRoot\OpenConsole.sln" @args + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (msbuild.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
claunia added the Issue-QuestionNeeds-Author-FeedbackProduct-TerminalArea-Build labels 2026-01-30 22:46:39 +00:00
Author
Owner

@adiviness commented on GitHub (Jun 24, 2019):

it sounds like msbuild isn't getting added to your path correctly, what's your path look like after running Set-MsBuildDevEnvironment?

@adiviness commented on GitHub (Jun 24, 2019): it sounds like msbuild isn't getting added to your path correctly, what's your path look like after running `Set-MsBuildDevEnvironment`?
Author
Owner

@jpandersen87 commented on GitHub (Jun 29, 2019):

I also ran into this issue. You need to run Set-MsBuildDevEnvironment with the Prerelease parameter set to $true for the script to find VS2019.

@jpandersen87 commented on GitHub (Jun 29, 2019): I also ran into this issue. You need to run Set-MsBuildDevEnvironment with the Prerelease parameter set to $true for the script to find VS2019.
Author
Owner

@ghost commented on GitHub (Jul 3, 2019):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jul 3, 2019): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@0x11DFE commented on GitHub (Nov 26, 2021):

I am having the same issue, DEV's bump?

@0x11DFE commented on GitHub (Nov 26, 2021): I am having the same issue, DEV's bump?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2095