在VS2015 RC上添加本机工具命令提示符 [英] Adding Native Tools Command Prompt on VS2015 RC
问题描述
由于我无法在工具菜单下找到Native Tools CMD,我尝试手动将其添加到外部工具中。几个问题:
- 无论我为命令(ARM,x86或x64等)选择什么, strong>命令永远是 C:\Windows\System32\cmd.exe 。为什么不同的CMD最终具有与本机System32的CMD相同的路径?
- 参考 解决方案
为什么不同的CMD最终拥有与本机相同的路径System32的CMD?
VS2015 * CMD只是一些环境变量的
cmd.exe
为你设立所以例如,而不是键入C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe
运行InstallUtil.exe
,您将只输入InstallUtil
,它将工作。如果您没有设置环境变量,您将收到一条错误消息,指出installutil不被识别为内部或外部命令,可操作的程序或批处理文件。
< blockquote>
/ k是什么,这个参数的bat是什么?为什么需要将路径作为参数传递给命令提示符?
/ k
是cmd的参数。 exe
,它的作用是运行由以下字符串指定的命令(在这种情况下它将执行C:\Program Files(x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat
并执行)。
什么是初始目录?
初始目录用于指定工作目录,您的
cmd.exe
实例将从
开始所以最终你会有这样的Visual Studio 2015:
VS2015的参数是:
< blockquote>
/ kC:\Program Files(x86)\Microsoft Visual Studio 14 .0 \Common7\Tools\VsDevCmd.bat
Since I cannot locate Native Tools CMD under the Tools menu, I try to manually add it in External Tools. Few questions:
- Regardless of what I choose for Command (ARM, x86 or x64 etc.), Command is always C:\Windows\System32\cmd.exe. Why the different CMDs end up having the same path to the native System32's CMD?
- Referring to this answer, I should insert /k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" to the arguments - what is the /k and what is the bat for this argument? Why do I need to pass a path as an argument to the command prompt?
- What is Initial Directory?
解决方案Why the different CMDs end up having the same path to the native System32's CMD?
The VS2015* CMDs are just
cmd.exe
with some environment variables already set up for you. so for example instead of typing"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe"
to runInstallUtil.exe
you will just typeInstallUtil
and it will work. if you didn't set up the environment variables you will get an error message saying that 'installutil' is not recognized as an internal or external command, operable program or batch file.what is the /k and what is the bat for this argument? Why do I need to pass a path as an argument to the command prompt?
/k
is a parameter forcmd.exe
and what it does is run the commands specified by the string that follows (in this case it will execute what's inside"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
and will carry out).What is Initial Directory?
Initial directory is used to specify the working directory that your
cmd.exe
instance will start inSo in the end you'll have something like this for Visual Studio 2015:
The "arguments" for VS2015 is :
/k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
这篇关于在VS2015 RC上添加本机工具命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!