Visual Studio: how to open a file from a Windows command prompt on a specific line at launch of a VS instance?

Unfortunately, you cannot use the Windows command line to open a file in an already running instance of Visual Studio with a specific line number. (VS 2008)

Opening a file in Visual Studio at a specific line number shows a combination of command-line options that fails and presents code for an executable file that can be called instead of the command line - but this code does not create ready-made assemblies in VS 2008.

Does anyone know of a workaround (such as a VS macro) that can accomplish this very basic task?

(Note: only the bureaucracy could prevent this very basic function from being realized in 10 years of intensive commercial use.)

Thanks Dan Nissenbaum

+5
source share
3 answers

Answer (a few months later): This is not possible. (Without writing a tedious script - and such a script cannot be directly, if at all, found on the Internet.)

Therefore, it is true that Microsoft simply did not implement this very basic function in the IDE.

I do not know if this feature was implemented in VS 2010.

The absence of this feature makes it impossible to use the IDE as an editor in combination with third-party search tools (such as PowerGREP).

Sad

+3
source

If you can upgrade to VS2008 SP1, then the answer to the question about Fourier Olivier should work to open the file in an existing instance of Visual Studio:

devenv /edit FILE_PATH

, , , perl script python (. dte_put_file). vim, , . ( .)

+5

VBS script (Windows VBScript - - )

open-in-msvs.vbs full-path-to-file line column

: : MSVS .

+1

All Articles