Configuring Visual Studio "External Tools" to run Ildasm, Emacs, Windows Explorer, and Command Prompt
2002-09-03 10:13 Tue, dotNET, command line compilers, external tools, remoting
Its easy to configure basic development tools to run on the current assembly or source file selected in Visual Studio's Solution Explorer.
The “Visual Studio .NET Command Prompt” program menu option sets up the correct environment.
C# compiler is csc. Visual Basic is vbc.
Here are the key parameter choices for the basic tools that aren't included in the default configuration. In each case, start with the “External Tools...“ command on the Visual Studio Tools menu.
To run Ildasm.exe on the assembly currently selected in the Solution Explorer:
· C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\ildasm.exe (default installation path).
· $(TargetPath)
· $(TargetDir)
To run emacs on the source file currently selected in Solution Explorer:
· C:\ProgFiles\emacs\bin\runemacs.exe (adjust your path to match your emacs installation).
· $(ItemPath)
· $(ItemDir)
To configure the emacs shell to load vsvars32.bat on startup, modify your emacs startup script as follows:
· Copy vsvars32.bat from C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools to c:\ProgFiles
· (setq explicit-cmdproxy.exe-args '("/q /k C:\\ProgFiles\\vsvars32.bat"))
To open a command prompt window configured to run visual studio command line tools in the folder containing the currently selected assembly:
· c:\windows\system32\cmd.exe (default installation path)
· /k C:\ProgFiles\vsvars32.bat (assumes you copied the file to this location as described above)
· $(TargetDir)
To open a Windows Explorer window to the folder containing the file currently selected in Solution Explorer:
· c:\windows\explorer.exe
· $(ItemDir)