" 'devenv' is not recognized as an internal or external command ..."

spb picture spb · Jun 1, 2016 · Viewed 23.6k times · Source

Is there a way to just open a VS project from the command prompt? For example, the way with Atom, you can navigate to the folder you'd like to open and just run "atom ." Does that kind of utility exist for VS?

edit: Would the equivalent to this be "C:\> devenv /run SomeSolution.sln" ?

if so, great! But there still seems to be a problem because I think the "devenv" command should at least be recognized, but I currently get

'devenv' is not recognized as an internal or external command, operable program or batch file.

I saw that a S/O contributer recommended adding

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe

to the PATH environment variables values like this, per MSDN, which I did, but I get the same message.

Can anyone explain what might be going on and how to fix it? Thanks

Answer

Avius picture Avius · Mar 14, 2018

You need to add new path to existing Path value.

Complete solution:

  1. Go to MyComputer >> Properties >> Change Settings >> Advanced >> Environmental variables

  2. Click on Path value on bottom pane, and then click Edit.

  3. Add new path to your devenv.exe folder location. For me this is "D:\Program Files\Microsoft Visual Studio Community 2017\Common7\IDE\"