Is not recognized as an internal or external command in Visual Studio code?

Perhaps cmd.exe and node.js work because you're in the directory where the solana binary is? Are you sure that the solana bin is in your systems PATH variable? Which shell is your Visual Studio Code using? If all that fails, try rebooting :)

If you're actually planning to develop programs on solana using Windows, I recommend using WSL(Windows Subsystem for Linux) and set that up for your development, because the Solana cargo doesn't appear to work on Windows - unless things have changed within the last couple of months.

I have working a lot recently with visual studio code and why not. I am into Power platform and with power platform developer extensions focused more on client side technologies, I association with visual studio code shall be for long.

And whenever I develop PCF Controls, I am on this platform. Where you are an expert in something and have done something many a times, you frequently tend to overlook some areas which you haven’t thought about ever.

I realized that when one of my blog readers reported he is getting the error while using msbuild command and building his PCF control using Visual studio code. It just always works for me and I never thought that if someone get stuck in that step.

I am from Dynamics 365 and Power platform background and I keep my posts related to it. But if your are here with the issue but belong to a different technology, you shall find the blog equally useful.

Precisely, below scenario resolutions are discussed in this blog.

  • You get an error – “msbuild is not recognized as internal or external command” while executing msbuild command from your regular command prompt
  • You get an error – “msbuild is not recognized as internal or external command” while executing msbuild command from Visual studio code.
Is not recognized as an internal or external command in Visual Studio code?

Please follow the below steps to resolve this.

  1. Navigate to your computer properties
Is not recognized as an internal or external command in Visual Studio code?

2. Click on Advanced system settings.

Is not recognized as an internal or external command in Visual Studio code?

3. Click of Environment variables button

Is not recognized as an internal or external command in Visual Studio code?

4. Add the msbuild.exe file to the path variable

Is not recognized as an internal or external command in Visual Studio code?
Is not recognized as an internal or external command in Visual Studio code?

Path for visual studio 2017

%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin

Path for Visual studio 2019

%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin

All required steps are now done. Make sure to reopen your command prompt or visual studio code terminal. Now if you run msbuild command, it should work fine.

P.S – You do not need to perform these steps if working with Developer command prompt for Visual studio.

Hope this small tip helped!

You can find tons of useful information in my blog to deal with Dynamics 365 or Power platform.

Also, if you are faced with a really challenging situation, you can seek the assistance of Dynamics 365 Consultants who can save you plenty of time by getting to the roots of the problem and fixing it faster.

Debajit Dutta
Business Solutions MVP

Is not recognized as an internal or external command Visual Studio?

You can resolve this issue in three ways: First, use the full path of the executable file to launch the program. Second, add the program path to Windows environment variables. Finally, move the files to the System32 folder.

Is not Recognised as an internal or external command?

The “Python is not recognized as an internal or external command” error is encountered in the command prompt of Windows. The error is caused when Python's executable file is not found in an environment variable as a result of the Python command in the Windows command prompt.

Why is Node not recognized in Visual Studio Code?

You must click the Kill Terminal button (highlighted) and then restart VS Code and node will start working again. Best on making a change of system environment variable Path is restarting Windows to make sure that really all processes make use of the modified Path variable.

Is not recognized as the name of a cmdlet VS Code?

If you see the error "The term 'cl.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.", this usually means you are running VS Code outside of a Developer Command Prompt for Visual Studio and VS Code doesn't know the path to the cl.exe compiler.