For years I’ve used a tool I found internally at Microsoft called VSEdit to load a file into an existing instance of Visual Studio from the command line. Microsoft released that handy little tool on MSDN (albeit without the source), but they also added the feature directly to the Visual Studio executable image (devenv). Sara Ford from Microsoft blogged about it on her MSDN blog.

All you have to do is launch the following command:

devenv /edit <filename>

That works great from a Visual Studio command line, which adds the correct directory to your path. After looking at all the executable images in that directory, I decided to add it to my path for all command prompt windows. For Visual Studio 2008, add one of these paths to your PATH environment variable (depending on if you are running on 32-bit or 64-bit Windows) and then relaunch your command prompt:

C:\Program Files \Microsoft Visual Studio 9.0\Common7\IDE
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE

Thanks Sara, and thanks Microsoft!