I need to run web.exe file from my developer command prompt in Visual Studio 2013. By default, the command prompt is not installed in Visual Studio 2013.
我需要运行网络。exe文件从我的开发者命令提示在Visual Studio 2013。默认情况下,命令提示符不会安装在Visual Studio 2013中。
Previously, I was using Visual Studio 2012. It had developer command prompt installed by default.
之前,我使用Visual Studio 2012。它默认安装了developer命令提示符。
Does anyone know why VS2013 doesn't have developer command prompt by default? How can I setup developer command prompt for VS2013?
有人知道为什么VS2013在默认情况下没有开发人员命令提示吗?如何为VS2013设置开发人员命令提示符?
9 个解决方案
#1
235
From VS2013 Menu Select "Tools", then Select "External Tools". Enter as below:
从VS2013菜单选择“工具”,然后选择“外部工具”。输入如下:
-
Title: "VS2013 Native Tools-Command Prompt" would be good
- 标题:“VS2013本机工具-命令提示符”将会很好。
-
Command:
C:\Windows\System32\cmd.exe
- 命令:C:\Windows\System32\cmd.exe
-
Arguments:
/k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
- 参数:/k“C:\程序文件(x86)\微软Visual Studio 12.0\Common7\ VsDevCmd.bat”
-
Initial Directory: Select as suits your needs.
- 初始目录:选择适合您的需要。
Click OK. Now you have command prompt access under the Tools Menu.
单击OK。现在,在“工具”菜单下有命令提示访问。
#2
301
For some reason, it doesn't properly add an icon when running Windows 8+. Here's how I solved it:
出于某种原因,在运行Windows 8+时,它没有正确地添加一个图标。我是这样解决的:
Using Windows Explorer, navigate to:
使用Windows资源管理器,导航到:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2013
In that folder, you'll see a shortcut named Visual Studio Tools
that maps to (assuming default installation):
在该文件夹中,您将看到一个名为Visual Studio工具的快捷方式,该工具映射到(假设默认安装):
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
Double-click the shortcut (or go to the folder above).
双击快捷方式(或转到上面的文件夹)。
From that folder, copy the shortcut named Developer Command Prompt for VS2013
(and any others you find useful) to the first directory (for the Start Menu
). You'll likely be prompted for administrative access (do so).
从该文件夹中,复制名为Developer命令提示符的快捷方式,用于VS2013(以及任何您认为有用的)到第一个目录(用于开始菜单)。您可能会被提示进行管理访问(这样做)。
Once you've done that, you'll now have an icon available for the 2013 command prompt.
一旦你完成了这个任务,你现在就可以为2013年的命令提示提供一个图标了。
#3
25
I used a modified version of this answer - based on my experiences adding it to VS 2010:
我使用了这个答案的修改版本——基于我在VS 2010中添加的经验:
- Select
Tools
>>External Tools
in Visual Studio - 在Visual Studio中选择工具>>外部工具。
- Click
Add
- 单击Add
- Title: I use
Visual Studio Command &Prompt
-
&P
Makes P a alt-shortcut key (when menu active) - P使P成为快捷键(当菜单激活时)
- I originally used C, but that conflicts with the existing shortcut for Customize
- 我最初使用的是C,但与现有的自定义快捷方式冲突。
-
- 标题:我使用Visual Studio命令&Prompt &P在我最初使用C的时候使用了一个快捷键(当菜单激活时),但是它与现有的自定义快捷键冲突。
- Command:
C:\Windows\System32\cmd.exe
- 命令:C:\Windows\System32\cmd.exe
- Arguments:
\k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat
-
/k
keeps a secondary session active so the window doesn’t close on the .bat file - /k使辅助会话保持活跃,因此窗口不会关闭.bat文件。
-
- 参数:\ k:\程序文件(x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32。bat /k保持一个辅助会话,所以窗口不会关闭。bat文件。
- Initial Directory: I use
$(ProjectDir)
(from the dropdown) - 初始目录:我使用$(ProjectDir)(从下拉菜单)
- Click OK.
- 单击OK。
Now you have command prompt access under the Tools Menu.
现在,在“工具”菜单下有命令提示访问。
See also: Add command prompt to Visual C# Express 2010
参见:添加命令提示符到Visual c# Express 2010。
#4
15
You can simply go to Menu > All Programs > Visual Studio 2013. Select the folder link "Visual Studio Tools". This will open the folder. There is bunch of shortcuts for command prompt which you can use. They worked perfectly for me.
你可以直接去>菜单> Visual Studio 2013。选择文件夹链接“Visual Studio工具”。这将打开文件夹。有很多命令提示的快捷方式可以使用。他们为我做得很好。
I think the trick here might be there are different versions for different processors, hence they put them all together.
我想这里的诀窍可能是不同的处理器有不同的版本,所以他们把它们放在一起。
#5
7
I don't know if this changed recently -- the answer given by Samuel did not apply to me even though that link seemed authoritative.
我不知道这是否最近发生了变化——塞缪尔的回答并不适用于我,尽管这个链接似乎很有权威性。
A couple of things
几件事情
1) For some reason, the folder in the start menu is called Visual Studio 2013
, and not Microsoft Visual Studio 2013
. Using the win8 apps interface you might see the 2010 entry Microsoft Visual Studio 2010
, and since you don't see the new 2013 folder Microsoft Visual Studio 2013
next to it, you assume it isn't there. But it is.. Just a few page scrolls away..
1)由于某种原因,开始菜单中的文件夹被称为Visual Studio 2013,而不是Microsoft Visual Studio 2013。使用win8应用程序界面,你可能会看到2010年的微软Visual Studio 2010,而且由于你没有看到2013年微软Visual Studio 2013的新文件夹,你会认为它不在那里。但这是. .只需要几页纸就可以了。
2) It seems the Windows 8 (or 8.1 at least) cannot display sub-folders. I tried creating a folder underneath the Visual Studio 2013
folder with shortcuts, and the entire folder just didn't show.
2)看起来Windows 8(至少是8.1)不能显示子文件夹。我尝试用快捷方式在Visual Studio 2013文件夹下创建一个文件夹,整个文件夹都没有显示。
3) Which is why what is installed is a shortcut. Not sure what the windows 7 behavior is with a shortcut in the start menu, but the apps menu just displays it like a folder. When you click on it, it brings you to the so-called missing shortcuts in explorer.
3)这就是为什么安装是捷径。不确定windows 7的行为在开始菜单中的快捷方式是什么,但应用程序菜单只是显示它就像一个文件夹。当你点击它时,它会把你带到浏览器中所谓的缺失捷径。
Final solution: under C:\ProgramData\Microsoft\Windows\Start Menu\Programs
, create a new folder called Microsoft Visual Studio 2013
. Copy the shortcuts from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
to that new folder. Then you'll have your icons using the windows 8 app interface under the heading which is the new folder name.
最后的解决方案:在C:\ProgramData\Microsoft\Windows\开始菜单\程序,创建一个新的文件夹,称为Microsoft Visual Studio 2013。复制的快捷键C:\Program Files (x86)\Microsoft Visual Studio 12.0 \ Common7 \工具\新文件夹的快捷方式。然后,你会在标题下使用windows 8的应用程序界面,这是新的文件夹名。
You'll also be able to just start typing from the start screen VS2013
, and the icons will now show up.
你也可以从开始的屏幕VS2013开始输入,图标现在会显示出来。
#6
1
Since any solution given so far will open the command prompt on the project folder, you would still have to navigate to the project's folder. If you are interested in getting the command prompt directly into the project's folder, here is my 2 steps:
既然到目前为止给出的任何解决方案都将在项目文件夹中打开命令提示符,您仍然需要导航到项目的文件夹。如果您有兴趣直接将命令提示输入到项目的文件夹中,这里是我的两个步骤:
- Right-click in solution explorer on the project name (just under the solution name) and choose the command "Open Folder in File Explorer"
- 在“解决方案资源管理器”中右键单击项目名称(仅在解决方案名称下面),并选择“文件资源管理器中的打开文件夹”命令
- Once the Windows Explorer is open, just type in the address bar "cmd" and then hit enter!
- 一旦Windows资源管理器打开,只需输入地址栏“cmd”,然后点击进入!
Et voila! Hope that helps
果不其然!希望这有助于
#7
1
Visual studio command prompt is nothing but the regular command prompt where few environment variables are set by default. This variables are set in the batch script : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat . So basically to get a visual studio command prompt for a particular version, just open regular command prompt and run this batch script : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat (Change the visual studio version based on your installed version). Voila you have got the visual studio command prompt. You can write a script to run the batch file and open cmd.exe.
Visual studio命令提示符只是常规命令提示符,在默认情况下很少设置环境变量。这个变量是在批处理脚本中设置:C:\Program Files (x86)\Microsoft Visual Studio 14.0 \ Common7 \ \ VsDevCmd工具。蝙蝠。所以基本上得到特定版本的visual studio命令提示符,定期打开命令提示符并运行这个批处理脚本:C:\Program Files (x86)\Microsoft visual studio 14.0 \ Common7 \ \ VsDevCmd工具。bat(根据安装的版本更改visual studio版本)。你已经得到了visual studio命令提示符。您可以编写一个脚本来运行批处理文件并打开cmd.exe。
#8
1
Works with VS 2017
I did installed Visual Studio Command Prompt (devCmd) extension tool.
You can download it here: https://marketplace.visualstudio.com/items?itemName=ShemeerNS.VisualStudioCommandPromptdevCmd#review-details
在VS 2017的工作中,我确实安装了Visual Studio命令提示符(devCmd)扩展工具。你可以在这里下载:https://marketplace.visualstudio.com/items?itemName=ShemeerNS.VisualStudioCommandPromptdevCmd#review-details。
Double click on the file, make sure IDE is closed during installation.
Open visual studio and Run Developer Command Prompt from VS2017
双击文件,确保在安装期间关闭IDE。打开visual studio并运行VS2017的Developer命令提示。
#9
0
I'm using VS 2012, so I navigated to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools
" and ran as administrator this "Developer Command Prompt for VS2012" shortcut. In command shell I pasted the suggested
我使用的是VS2012,所以我导航到“C:\程序数据\微软\Windows\启动菜单\程序\微软Visual Studio 2012\Visual Studio工具”,并作为管理员运行这个“VS2012”快捷方式的“开发者命令提示符”。在命令shell中,我粘贴了建议。
aspnet_regiis -i
aspnet_regiis -我
and as I suspected this did not yield any success on Windows 10:
正如我所怀疑的,这并没有在Windows 10上取得任何成功:
So all I needed to do was "Turn Windows Features On/Off" at Control Panel and restart my machine to effect the changes. That did resolve the issue. Thanks.
因此,我所需要做的就是在控制面板上“打开/关闭Windows的功能”,然后重启我的机器来实现这些改变。这确实解决了这个问题。谢谢。
#1
235
From VS2013 Menu Select "Tools", then Select "External Tools". Enter as below:
从VS2013菜单选择“工具”,然后选择“外部工具”。输入如下:
-
Title: "VS2013 Native Tools-Command Prompt" would be good
- 标题:“VS2013本机工具-命令提示符”将会很好。
-
Command:
C:\Windows\System32\cmd.exe
- 命令:C:\Windows\System32\cmd.exe
-
Arguments:
/k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
- 参数:/k“C:\程序文件(x86)\微软Visual Studio 12.0\Common7\ VsDevCmd.bat”
-
Initial Directory: Select as suits your needs.
- 初始目录:选择适合您的需要。
Click OK. Now you have command prompt access under the Tools Menu.
单击OK。现在,在“工具”菜单下有命令提示访问。
#2
301
For some reason, it doesn't properly add an icon when running Windows 8+. Here's how I solved it:
出于某种原因,在运行Windows 8+时,它没有正确地添加一个图标。我是这样解决的:
Using Windows Explorer, navigate to:
使用Windows资源管理器,导航到:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2013
In that folder, you'll see a shortcut named Visual Studio Tools
that maps to (assuming default installation):
在该文件夹中,您将看到一个名为Visual Studio工具的快捷方式,该工具映射到(假设默认安装):
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
Double-click the shortcut (or go to the folder above).
双击快捷方式(或转到上面的文件夹)。
From that folder, copy the shortcut named Developer Command Prompt for VS2013
(and any others you find useful) to the first directory (for the Start Menu
). You'll likely be prompted for administrative access (do so).
从该文件夹中,复制名为Developer命令提示符的快捷方式,用于VS2013(以及任何您认为有用的)到第一个目录(用于开始菜单)。您可能会被提示进行管理访问(这样做)。
Once you've done that, you'll now have an icon available for the 2013 command prompt.
一旦你完成了这个任务,你现在就可以为2013年的命令提示提供一个图标了。
#3
25
I used a modified version of this answer - based on my experiences adding it to VS 2010:
我使用了这个答案的修改版本——基于我在VS 2010中添加的经验:
- Select
Tools
>>External Tools
in Visual Studio - 在Visual Studio中选择工具>>外部工具。
- Click
Add
- 单击Add
- Title: I use
Visual Studio Command &Prompt
-
&P
Makes P a alt-shortcut key (when menu active) - P使P成为快捷键(当菜单激活时)
- I originally used C, but that conflicts with the existing shortcut for Customize
- 我最初使用的是C,但与现有的自定义快捷方式冲突。
-
- 标题:我使用Visual Studio命令&Prompt &P在我最初使用C的时候使用了一个快捷键(当菜单激活时),但是它与现有的自定义快捷键冲突。
- Command:
C:\Windows\System32\cmd.exe
- 命令:C:\Windows\System32\cmd.exe
- Arguments:
\k "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat
-
/k
keeps a secondary session active so the window doesn’t close on the .bat file - /k使辅助会话保持活跃,因此窗口不会关闭.bat文件。
-
- 参数:\ k:\程序文件(x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32。bat /k保持一个辅助会话,所以窗口不会关闭。bat文件。
- Initial Directory: I use
$(ProjectDir)
(from the dropdown) - 初始目录:我使用$(ProjectDir)(从下拉菜单)
- Click OK.
- 单击OK。
Now you have command prompt access under the Tools Menu.
现在,在“工具”菜单下有命令提示访问。
See also: Add command prompt to Visual C# Express 2010
参见:添加命令提示符到Visual c# Express 2010。
#4
15
You can simply go to Menu > All Programs > Visual Studio 2013. Select the folder link "Visual Studio Tools". This will open the folder. There is bunch of shortcuts for command prompt which you can use. They worked perfectly for me.
你可以直接去>菜单> Visual Studio 2013。选择文件夹链接“Visual Studio工具”。这将打开文件夹。有很多命令提示的快捷方式可以使用。他们为我做得很好。
I think the trick here might be there are different versions for different processors, hence they put them all together.
我想这里的诀窍可能是不同的处理器有不同的版本,所以他们把它们放在一起。
#5
7
I don't know if this changed recently -- the answer given by Samuel did not apply to me even though that link seemed authoritative.
我不知道这是否最近发生了变化——塞缪尔的回答并不适用于我,尽管这个链接似乎很有权威性。
A couple of things
几件事情
1) For some reason, the folder in the start menu is called Visual Studio 2013
, and not Microsoft Visual Studio 2013
. Using the win8 apps interface you might see the 2010 entry Microsoft Visual Studio 2010
, and since you don't see the new 2013 folder Microsoft Visual Studio 2013
next to it, you assume it isn't there. But it is.. Just a few page scrolls away..
1)由于某种原因,开始菜单中的文件夹被称为Visual Studio 2013,而不是Microsoft Visual Studio 2013。使用win8应用程序界面,你可能会看到2010年的微软Visual Studio 2010,而且由于你没有看到2013年微软Visual Studio 2013的新文件夹,你会认为它不在那里。但这是. .只需要几页纸就可以了。
2) It seems the Windows 8 (or 8.1 at least) cannot display sub-folders. I tried creating a folder underneath the Visual Studio 2013
folder with shortcuts, and the entire folder just didn't show.
2)看起来Windows 8(至少是8.1)不能显示子文件夹。我尝试用快捷方式在Visual Studio 2013文件夹下创建一个文件夹,整个文件夹都没有显示。
3) Which is why what is installed is a shortcut. Not sure what the windows 7 behavior is with a shortcut in the start menu, but the apps menu just displays it like a folder. When you click on it, it brings you to the so-called missing shortcuts in explorer.
3)这就是为什么安装是捷径。不确定windows 7的行为在开始菜单中的快捷方式是什么,但应用程序菜单只是显示它就像一个文件夹。当你点击它时,它会把你带到浏览器中所谓的缺失捷径。
Final solution: under C:\ProgramData\Microsoft\Windows\Start Menu\Programs
, create a new folder called Microsoft Visual Studio 2013
. Copy the shortcuts from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
to that new folder. Then you'll have your icons using the windows 8 app interface under the heading which is the new folder name.
最后的解决方案:在C:\ProgramData\Microsoft\Windows\开始菜单\程序,创建一个新的文件夹,称为Microsoft Visual Studio 2013。复制的快捷键C:\Program Files (x86)\Microsoft Visual Studio 12.0 \ Common7 \工具\新文件夹的快捷方式。然后,你会在标题下使用windows 8的应用程序界面,这是新的文件夹名。
You'll also be able to just start typing from the start screen VS2013
, and the icons will now show up.
你也可以从开始的屏幕VS2013开始输入,图标现在会显示出来。
#6
1
Since any solution given so far will open the command prompt on the project folder, you would still have to navigate to the project's folder. If you are interested in getting the command prompt directly into the project's folder, here is my 2 steps:
既然到目前为止给出的任何解决方案都将在项目文件夹中打开命令提示符,您仍然需要导航到项目的文件夹。如果您有兴趣直接将命令提示输入到项目的文件夹中,这里是我的两个步骤:
- Right-click in solution explorer on the project name (just under the solution name) and choose the command "Open Folder in File Explorer"
- 在“解决方案资源管理器”中右键单击项目名称(仅在解决方案名称下面),并选择“文件资源管理器中的打开文件夹”命令
- Once the Windows Explorer is open, just type in the address bar "cmd" and then hit enter!
- 一旦Windows资源管理器打开,只需输入地址栏“cmd”,然后点击进入!
Et voila! Hope that helps
果不其然!希望这有助于
#7
1
Visual studio command prompt is nothing but the regular command prompt where few environment variables are set by default. This variables are set in the batch script : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat . So basically to get a visual studio command prompt for a particular version, just open regular command prompt and run this batch script : C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat (Change the visual studio version based on your installed version). Voila you have got the visual studio command prompt. You can write a script to run the batch file and open cmd.exe.
Visual studio命令提示符只是常规命令提示符,在默认情况下很少设置环境变量。这个变量是在批处理脚本中设置:C:\Program Files (x86)\Microsoft Visual Studio 14.0 \ Common7 \ \ VsDevCmd工具。蝙蝠。所以基本上得到特定版本的visual studio命令提示符,定期打开命令提示符并运行这个批处理脚本:C:\Program Files (x86)\Microsoft visual studio 14.0 \ Common7 \ \ VsDevCmd工具。bat(根据安装的版本更改visual studio版本)。你已经得到了visual studio命令提示符。您可以编写一个脚本来运行批处理文件并打开cmd.exe。
#8
1
Works with VS 2017
I did installed Visual Studio Command Prompt (devCmd) extension tool.
You can download it here: https://marketplace.visualstudio.com/items?itemName=ShemeerNS.VisualStudioCommandPromptdevCmd#review-details
在VS 2017的工作中,我确实安装了Visual Studio命令提示符(devCmd)扩展工具。你可以在这里下载:https://marketplace.visualstudio.com/items?itemName=ShemeerNS.VisualStudioCommandPromptdevCmd#review-details。
Double click on the file, make sure IDE is closed during installation.
Open visual studio and Run Developer Command Prompt from VS2017
双击文件,确保在安装期间关闭IDE。打开visual studio并运行VS2017的Developer命令提示。
#9
0
I'm using VS 2012, so I navigated to "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools
" and ran as administrator this "Developer Command Prompt for VS2012" shortcut. In command shell I pasted the suggested
我使用的是VS2012,所以我导航到“C:\程序数据\微软\Windows\启动菜单\程序\微软Visual Studio 2012\Visual Studio工具”,并作为管理员运行这个“VS2012”快捷方式的“开发者命令提示符”。在命令shell中,我粘贴了建议。
aspnet_regiis -i
aspnet_regiis -我
and as I suspected this did not yield any success on Windows 10:
正如我所怀疑的,这并没有在Windows 10上取得任何成功:
So all I needed to do was "Turn Windows Features On/Off" at Control Panel and restart my machine to effect the changes. That did resolve the issue. Thanks.
因此,我所需要做的就是在控制面板上“打开/关闭Windows的功能”,然后重启我的机器来实现这些改变。这确实解决了这个问题。谢谢。