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開始輸入,現在將顯示圖標。

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