Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code "Open With Code" does not appear after right-clicking a folder

Just installed Visual Studio Code 1.1.1 on a Windows 7 machine. When I right-click on a folder, "Open With Code" does not appear.

enter image description here

like image 217
Derek Avatar asked May 18 '16 17:05

Derek


People also ask

How do I show open with VS Code in right click?

You can now navigate to a folder through Windows Explorer, right click on either the folder icon or in the folder itself, and you will see an option to “Open Folder as VS Code Project”. As a bonus, you can right click on individual files and “Edit with VS Code” as well.

How do I open VS Code in a specific folder?

Go to the directory in the command pallet on your computer the navigate to the the specific folder using cd the type code . and that will open the folder and the files in it inside vs code. works like a charm.

How do I add open with Visual Studio?

If you installed Visual Studio Code at a non-default location, a prompt will ask for the path to Code.exe. You can always change the location in Tools -> Options -> Web -> Open In Visual Studio Code.


2 Answers

Copied from Right click on Windows folder and open with Visual Studio Code

  • Create file vsCodeOpenFolder.reg with this content (If you didn't choose the default installation path then you need to adjust the paths in this file):

     Windows Registry Editor Version 5.00  ; Open files  [HKEY_CLASSES_ROOT\*\shell\Open with VS Code]  @="Edit with VS Code"  "Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0"  [HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]  @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""  ; This will make it appear when you right click ON a folder  ; The "Icon" line can be removed if you don't want the icon to appear  [HKEY_CLASSES_ROOT\Directory\shell\vscode]  @="Open Folder as VS Code Project"  "Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"  [HKEY_CLASSES_ROOT\Directory\shell\vscode\command]  @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""  ; This will make it appear when you right click INSIDE a folder  ; The "Icon" line can be removed if you don't want the icon to appear  [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]  @="Open Folder as VS Code Project"  "Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"  [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]  @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\"" 
  • Double click it to create the registry entries.

  • If the "Open with Code" doesn't appear in the Explorer's context menu then you should restart your system.

  • If you're running the 64-bit or Insiders version of VS Code, change the path accordingly.

like image 167
Wosi Avatar answered Oct 02 '22 17:10

Wosi


When installing (or reinstall and) check all checkBoxes especially:

Add "Open with Code" action to Windows Explorer file context menu
Add "Open with Code" action to Windows Explorer directory context menu

install vscode

I hope this helps.

like image 37
wasmup Avatar answered Oct 02 '22 15:10

wasmup