Unfortunately, it is impossible to use the Windows command line to open a file in an already-running instance of Visual Studio at a specific line number. (VS 2008)
Open a file in Visual Studio at a specific line number shows a command-line parameter combination that fails, and presents code for an executable that can be called instead at the command line - but this code does not build out-of-the-box in VS 2008.
Does anyone know of a workaround (such as a VS macro) that is able to accomplish this very basic task?
start MySolution/MySolution. sln and hit Enter . This will open whatever version of Visual Studio you currently have set to open with . sln files in Windows.
Type "start [filename.exe]" into Command Prompt, replacing "filename" with the name of your selected file. Replace "[filename.exe]" with your program's name. This allows you to run your program from the file path.
If you can upgrade to VS2008 SP1, then Fouré Olivier's answer should work to open a file in an existing instance of Visual Studio:
devenv /edit FILE_PATH
For other solutions similar to the answer you linked to, there's a similar perl script here and a python plugin here (see dte_put_file). Both are for use with vim, but you could fix them up to work for anything. (I haven't used either of them.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With