Search code examples
visual-studiocommand-prompt

Starting Visual Studio from a command prompt


I have three different versions of Visual Studio installed on my machine, Visual Studio 2003, Visual Studio 2008, and VS2005.

How do I start a particular version of Visual Studio using a command prompt?

devenv.exe opens the latest version of Visual Studio. What should I do if I want to open Visual Studio 2003 using a command prompt?


Solution

  • You have to use the path to distinguish them. For instance, here is the Visual Studio 2005 command on my laptop:

        "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe"
    

    For Visual Studio 2022 use

    "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv"
    

    Here's another tip: You can figure out how to run various Windows applications from the command line by finding them in the Windows Start Menu, right-clicking on the icon, select properties, and then on the Shortcut tab, look at the Target textbox. Copy that text out and usually you can use it at a console command line.