1

Visual Studio 2019, Windows 11. IBM Blockchain Platform Tutorial, A5: Invoking a smart contract from an external application, step A5.26: In the main VS Code menu, click 'Terminal' -> 'Run Build Task...':

I get the error below:

Executing task in folder src: msbuild /property:GenerateFullPaths=true /t:build /consoleloggerparameters:NoSummary

'msbuild' is not recognized as an internal or external command,
operable program or batch file.
The terminal process "C:\WINDOWS\System32\cmd.exe /d /c msbuild /property:GenerateFullPaths=true /t:build /consoleloggerparameters:NoSummary" terminated with exit code: 1.

Every step runs good to this point. VS is updated. Need help. If you offer any advice, please be specific. I am not a programmer or developer, have some experience but not much. I won't know what runs on /PATH/xxx/version...unless you tell me what 'xxx' is. I have written a blockchain (through a tutorial) and got it to run. Thanks. Just trying to learn.

stijn
  • 34,664
  • 13
  • 111
  • 163
  • I'm not an expert on microsoft tools but I'm guessing it's due to you using VS Code but also have visual studio installed as msbuild is probably something visual studio set's up. Googling the error message brings up a few hits that you might want to explore or perhaps uninstall visual studio 2019 (but leave VS Code installed) – david_k Jan 25 '22 at 23:21
  • Not: there's no such thing as 'Visual Studio Code 2019', only 'Visual Studio Code' and 'Visual Studio 2019'. Edited that in your question. – stijn Jan 26 '22 at 07:54

1 Answers1

4

Start VS Code by running code.exe from a Developer Command Prompt for VS 2019 (which is in the the Windows start menu under Visual Studio 2019). That will setup the path correctly to use VS2019 tools, including msbuild. And VS Code will inherit that path so will have access to msbuild.

stijn
  • 34,664
  • 13
  • 111
  • 163