IT TIP

폴더를 마우스 오른쪽 단추로 클릭 한 후 Visual Studio 코드 "코드로 열기"가 나타나지 않음

itqueen 2020. 12. 13. 11:34
반응형

폴더를 마우스 오른쪽 단추로 클릭 한 후 Visual Studio 코드 "코드로 열기"가 나타나지 않음


Windows 7 컴퓨터에 Visual Studio Code 1.1.1을 방금 설치했습니다. 폴더를 마우스 오른쪽 버튼으로 클릭하면 "코드로 열기"가 나타나지 않습니다.

여기에 이미지 설명 입력


http://thisdavej.com/right-click-on-windows-folder-and-open-with-visual-studio-code/ 에서 복사

  • 이 콘텐츠로 vsCodeOpenFolder.reg 파일을 만듭니다 (기본 설치 경로를 선택하지 않은 경우이 파일의 경로를 조정해야합니다).

    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\""
    
  • 두 번 클릭하여 레지스트리 항목을 만듭니다.

  • 탐색기의 컨텍스트 메뉴에 "코드로 열기"가 나타나지 않으면 시스템을 다시 시작해야합니다.
  • 64 비트 또는 내부자 버전의 VS Code를 실행하는 경우 그에 따라 경로를 변경합니다.

설치 (또는 재설치 및) 할 때 특히 모든 체크 박스를 확인하십시오.

Windows 탐색기 파일 컨텍스트 메뉴에
"코드로 열기"동작 추가 Windows 탐색기 디렉토리 컨텍스트 메뉴에 "코드로 열기"동작 추가

vscode 설치

이게 도움이 되길 바란다.


다음은 64 비트 버전 의 Visual Studio Code 와 함께 사용하기에 적합하기 전에 Cockney Rhyming Jedi에서 제공 한 파일 버전 입니다.

Windows 레지스트리 편집기 버전 5.00
; 파일 열기
[HKEY_CURRENT_USER \ Software \ Classes \ * \ shell \ VS 코드로 열기]
@ = "VS 코드로 편집"
"Icon"= "C : \\ Program Files \\ Microsoft VS Code \\ Code.exe, 0"
[HKEY_CURRENT_USER \ Software \ Classes \ * \ shell \ Open with VS Code \ command]
@ = "\"C : \\ Program Files \\ Microsoft VS Code \\ Code.exe \ "\"% 1 \ ""
; 폴더를 마우스 오른쪽 버튼으로 클릭하면 나타납니다.
; 아이콘을 표시하지 않으려면 "아이콘"줄을 제거 할 수 있습니다.
[HKEY_CURRENT_USER \ Software \ Classes \ Directory \ shell \ vscode]
@ = "VS 코드 프로젝트로 폴더 열기"
"Icon"= "\"C : \\ Program Files \\ Microsoft VS Code \\ Code.exe \ ", 0"
[HKEY_CURRENT_USER \ Software \ Classes \ Directory \ shell \ vscode \ 명령]
@ = "\"C : \\ Program Files \\ Microsoft VS Code \\ Code.exe \ "\"% 1 \ ""
; 폴더 내부를 마우스 오른쪽 버튼으로 클릭하면 나타납니다.
; 아이콘을 표시하지 않으려면 "아이콘"줄을 제거 할 수 있습니다.
[HKEY_CURRENT_USER \ Software \ Classes \ Directory \ Background \ shell \ vscode]
@ = "VS 코드 프로젝트로 폴더 열기"
"Icon"= "\"C : \\ Program Files \\ Microsoft VS Code \\ Code.exe \ ", 0
[HKEY_CURRENT_USER \ Software \ Classes \ Directory \ Background \ shell \ vscode \ 명령]
@ = "\"C : \\ Program Files \\ Microsoft VS Code \\ Code.exe \ "\"% V \ ""

NB : 이것은 32 비트 버전 용이며 64 비트 버전의 경우 Cepharum의 답변을 참조하십시오.

관리자가 아닌 사용자가 컨텍스트 메뉴에서 기능을 사용할 수 있도록 이전 답변을 약간 변경했습니다.

  • 이 콘텐츠로 vsCodeOpenFolder.reg 파일을 만듭니다 (기본 설치 경로를 선택하지 않은 경우이 파일의 경로를 조정해야합니다).

    Windows Registry Editor Version 5.00
    ; Open files
    [HKEY_CURRENT_USER\Software\Classes\*\shell\Open with VS Code]
    @="Edit with VS Code"
    "Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0"
    [HKEY_CURRENT_USER\Software\Classes\*\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_CURRENT_USER\Software\Classes\Directory\shell\vscode]
    @="Open Folder as VS Code Project"
    "Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
    [HKEY_CURRENT_USER\Software\Classes\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_CURRENT_USER\Software\Classes\Directory\Background\shell\vscode]
    @="Open Folder as VS Code Project"
    "Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0
    [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\vscode\command]
    @="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""
    
  • 두 번 클릭하여 레지스트리 항목을 만듭니다.

  • 탐색기의 컨텍스트 메뉴에 "코드로 열기"가 나타나지 않으면 시스템을 다시 시작해야합니다.

기본적으로 HKEY_CLASSES_ROOT를 HKEY_CURRENT_USER \ Software \ Classes로 대체했습니다.


이러한 설정은 일반적으로 VS Code에 대해 사용자별로 저장됩니다.

새 사용자 계정을 설정하려면 설치 프로그램을 다시 실행하십시오.


위의 레지스트리 항목 중 어느 것도 표준 (비 관리자) 사용자 계정으로 나를 위해 작동하지 않았습니다.

I then inserted all the keys into HKEY_LOCAL_MACHINE and then it worked!

Windows Registry Editor Version 5.00

; when you right click a file
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""

; when you right click a folder
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VSCode]
@="Open Folder in Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""

; when you right click a folder while holding shift
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\VSCode]
@="Open Folder in Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""

; when you right click the background, not on a particular file or folder.
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\LibraryFolder\Background\shell\VSCode]
@="Open Folder in Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\LibraryFolder\Background\shell\VSCode\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""

I'd like to add that, many would like to go for the Registry method because they are afraid they might loose all their settings. Just re-download(if you don't already have the download file ) and reinstall. When reinstalling, tick

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

as already said in other answers. Your settings will remain intact. In fact, when it launches, it launches with your working directory as if you never uninstalled it.


I had the same issue with earlier version of VS code 64 bit. It didn't work even after I re-installed by checking the above mentioned options.

I have installed the latest update of code v1.25.0, and the issue was automatically fixed.

대 코드 버전

Please find the 64 bit regedit fix here.


이 문제는 일반적으로 vs 코드 사용자에게 표준 사용자 역할이있을 때 발생합니다. VS Code 설치시 관리자 프롬프트가 표시되어 관리자 사용자로 vs 코드가 설치되었음을 의미합니다. 체크 박스를 선택하면 바로 가기가 추가되지만 설치시 관리자 프롬프트에 입력 한 관리자 계정에만 적용됩니다.

빠른 해결 방법은 현재 사용자 (vs 코드를 사용할 사용자)를 관리자 그룹에 임시로 추가하고, 현재 사용자 관리자 권한으로 VS Code를 제거한 다음 다시 설치하고, 설치 후 관리자 그룹에서 사용자를 제거하는 것입니다.

참고 URL : https://stackoverflow.com/questions/37306672/visual-studio-code-open-with-code-does-not-appear-after-right-clicking-a-folde

반응형