[Tip]Add VS Command Prompt As External Tool Into VS In Case missing it
2010-04-09 23:02
851 查看
Link from Code Project: http://www.codeproject.com/KB/dotnet/VSCPinYourIDE.aspx
In your IDE, go to Tools -> External Tools..
Click on the Add button.
Give a title of your own like “Command Prompt”.
In the ‘Command’ area, specify the path either by typing “C:\Windows\System32\cmd.exe” or by browsing to the folder “C:\Windows\System32” and selecting cmd.exe.
In the arguments area, specify the text "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat".
Set the Initial Directory to the solution directory.
Click on the OK button.
Now, the Visual Studio Command Prompt is available in the IDE tools menu.
Whenever you need the command prompt in the IDE, you can use this tool option and the command prompt will be available.
We can consider the VSCP as just a wrapper of the system command prompt. The VSCP will simply load the environment settings for the .NET framework so that you can use any of the framework tools in the command prompt and execute it without any errors like '...not recognized as an internal or external command..'. It is not necessary that we should use VSCP for using Visual Studio tools like sn.exe, gacutil.exe, etc. If you have set the environment variables properly for executing Visual Studio commands, you can use the system command prompt itself to use Visual Studio tools. Otherwise, you will get an error.
How to add VSCP to your IDE
We can add the VSCP as a tool in the IDE so it will be very easy to access the VSCP from the IDE itself.In your IDE, go to Tools -> External Tools..
Click on the Add button.
Give a title of your own like “Command Prompt”.
In the ‘Command’ area, specify the path either by typing “C:\Windows\System32\cmd.exe” or by browsing to the folder “C:\Windows\System32” and selecting cmd.exe.
In the arguments area, specify the text "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat".
Set the Initial Directory to the solution directory.
Click on the OK button.
Now, the Visual Studio Command Prompt is available in the IDE tools menu.
Whenever you need the command prompt in the IDE, you can use this tool option and the command prompt will be available.
Addition
Now, you may ask the question “what is the difference between the system command prompt and the VSCP?”We can consider the VSCP as just a wrapper of the system command prompt. The VSCP will simply load the environment settings for the .NET framework so that you can use any of the framework tools in the command prompt and execute it without any errors like '...not recognized as an internal or external command..'. It is not necessary that we should use VSCP for using Visual Studio tools like sn.exe, gacutil.exe, etc. If you have set the environment variables properly for executing Visual Studio commands, you can use the system command prompt itself to use Visual Studio tools. Otherwise, you will get an error.
What is vsvars32.bat?
Go to step 2. c, and you can notice the argument vsvars32.bat. What is this vsvars32.bat? It is simply a batch file setting the environment variables for the .NET framework tools. You can navigate to C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\ (in the case of Visual Studio 2008) and open the batch file vsvars32.bat for editing, and you will get a clear picture on the environment variable settings for the .NET Framework.相关文章推荐
- Use ILDASM.exe as an external tool in your VS2008
- [VS Tip]About "of" command in mini comand window in VS Find Combox
- [Tip]Command Window In VS
- How to create new view by using cleartool command in Clearcase?
- Add external tool in the Android Studio
- Add Open Command Prompt Here Functionality To Nautilus In Ubuntu
- [Tip: Exception Handle/Dump File/Expressions in Debugger]Enhance VS Debugging SKills
- VC++ Unable to register this add-in because its DllRegisterServer returns an error 解决方案
- QT常见问题一:VS打开QT解决方案,Qt Visual StudioAdd-in插件报错误
- VS 2005 Add-in开发随笔
- 'telnet' is not recognized as an internal or external command
- Inline Vs Internal Vs External CSS(译)
- 欢迎使用 FreeCode for VS60/VS2005 Add-in
- 编写VS.NET的Add-in帮助程序调试
- vs2015 The Help Viewer command line has missing parameters
- ArcGIS Add-in插件开发问题—VS中“…
- How can I always run the command prompt as administrator?
- Quick Tip: Marking an HDD as SSD or SSD as HDD in ESXi
- Add-in Express for Office and .NET v7.3支持VS 2013预览
- 使用cocopods导入第三方库报错 : [!] Pods written in Swift can only be integrated as frameworks; add `use_framew