VS2013的开发人员命令提示符在哪里?

本文翻译自:Where is Developer Command Prompt for VS2013?

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. 我需要在Visual Studio 2013中从我的开发人员命令提示符运行web.exe文件。默认情况下,Visual Studio 2013中未安装命令提示符。

Previously, I was using Visual Studio 2012. It had developer command prompt installed by default. 以前,我使用的是Visual Studio 2012.默认安装了开发人员命令提示符。

Does anyone know why VS2013 doesn't have developer command prompt by default? 有谁知道为什么VS2013默认没有开发人员命令提示符? How can I setup developer command prompt for VS2013? 如何为VS2013设置开发人员命令提示符?


#1楼

参考:https://stackoom.com/question/1S72a/VS-的开发人员命令提示符在哪里


#2楼

For some reason, it doesn't properly add an icon when running Windows 8+. 出于某种原因,在运行Windows 8+时,它无法正确添加图标。 Here's how I solved it: 这是我解决它的方式:

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 Tools的快捷方式,该快捷方式映射到(假设默认安装):

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 ). 从该文件夹中,将名为Developer Command Prompt for VS2013 (以及您认为有用的任何其他名称)的快捷方式复制到第一个目录(对于“ Start Menu )。 You'll likely be prompted for administrative access (do so). 您可能会被提示进行管理访问(这样做)。

Once you've done that, you'll now have an icon available for the 2013 command prompt. 完成后,您现在可以使用2013命令提示符的图标。


#3楼

From VS2013 Menu Select "Tools", then Select "External Tools". 从VS2013菜单选择“工具”,然后选择“外部工具”。 Enter as below: 输入如下:

  • Title : "VS2013 Native Tools-Command Prompt" would be good 标题 :“VS2013 Native Tools-Command Prompt”会很好
  • 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:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\VsDevCmd.bat"
  • Initial Directory : Select as suits your needs. 初始目录 :选择以满足您的需求。

Click OK. 单击确定。 Now you have command prompt access under the Tools Menu. 现在,您可以在“工具”菜单下找到命令提示符。


#4楼

I used a modified version of this answer - based on my experiences adding it to VS 2010: 我使用了这个答案的修改版本 - 根据我将其添加到VS 2010的经验:

  1. Select Tools >> External Tools in Visual Studio 在Visual Studio中选择Tools >> External Tools
  2. Click Add 单击Add
  3. Title: I use Visual Studio Command &Prompt 标题:我使用Visual Studio Command &Prompt
    • &P Makes P a alt-shortcut key (when menu active) &P使P成为alt快捷键(当菜单处于活动状态时)
    • I originally used C, but that conflicts with the existing shortcut for Customize 我最初使用的是C,但它与Customize的现有快捷方式冲突
  4. Command: C:\\Windows\\System32\\cmd.exe 命令: C:\\Windows\\System32\\cmd.exe
  5. Arguments: \\k "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\vsvars32.bat 参数: \\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文件上关闭
  6. Initial Directory: I use $(ProjectDir) (from the dropdown) 初始目录:我使用$(ProjectDir) (来自下拉列表)
  7. Click 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添加命令提示符


#5楼

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: 如果您有兴趣将命令提示符直接放入项目的文件夹,这是我的两个步骤:

  1. Right-click in solution explorer on the project name (just under the solution name) and choose the command "Open Folder in File Explorer" 在解决方案资源管理器中右键单击项目名称(在解决方案名称下),然后选择“在文件资源管理器中打开文件夹”命令
  2. Once the Windows Explorer is open, just type in the address bar "cmd" and then hit enter! 打开Windows资源管理器后,只需键入地址栏“cmd”,然后按Enter键!

Et voila! 瞧瞧! Hope that helps 希望有所帮助


#6楼

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 . 1)由于某种原因,开始菜单中的文件夹称为Visual Studio 2013 ,而不是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. 使用win8 apps界面,您可能会看到2010条目Microsoft Visual Studio 2010 ,并且由于您没有看到旁边的新2013文件夹Microsoft Visual Studio 2013 ,因此您认为它不存在。 But it is.. Just a few page scrolls away.. 但它只是几页滚动..

2) It seems the Windows 8 (or 8.1 at least) cannot display sub-folders. 2)似乎Windows 8(或至少8.1)无法显示子文件夹。 I tried creating a folder underneath the Visual Studio 2013 folder with shortcuts, and the entire folder just didn't show. 我尝试使用快捷方式在Visual Studio 2013文件夹下创建一个文件夹,整个文件夹都没有显示。

3) Which is why what is installed is a shortcut. 3)这就是为什么什么安装是一条捷径。 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. 不确定Windows 7的行为与开始菜单中的快捷方式有什么关系,但应用程序菜单只是将其显示为文件夹。 When you click on it, it brings you to the so-called missing shortcuts in explorer. 当您单击它时,它会将您带到资源管理器中所谓的缺失快捷方式。

Final solution: under C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs , create a new folder called Microsoft Visual Studio 2013 . 最终解决方案:在C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs ,创建一个名为Microsoft Visual Studio 2013的新文件夹。 Copy the shortcuts from C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\Shortcuts to that new folder. 将快捷方式从C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\Shortcuts复制到该新文件夹。 Then you'll have your icons using the windows 8 app interface under the heading which is the new folder name. 然后,您将使用标题下的Windows 8应用程序界面获取图标,这是新的文件夹名称。

You'll also be able to just start typing from the start screen VS2013 , and the icons will now show up. 您也可以从开始屏幕VS2013开始输入,现在将显示图标。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章