当前位置:网站首页>Vs code specifies the extension installation location

Vs code specifies the extension installation location

2022-07-07 10:17:00 Xuan Juan

VS Code Specify extension installation location

By default ,(Windows)vscode The installation path for is C:\Users\ user name \.vscode\extensions.

If you want to customize the installation path of the extension , Can't be directly in vscode Revision in China . however , Start up vscode When , You can specify the extension path .

D:\Software\Microsoft VS Code\bin>code --help
Visual Studio Code 1.68.1

Usage: code.exe [options][paths...]

To read output from another program, append '-' (e.g. 'echo Hello World | code.exe -')

...

Extensions Management
  --extensions-dir <dir>              Set the root path for extensions.
  --list-extensions                   List the installed extensions.

You can see ,code There is a option --extensions-dir, It is used to specify the extension installation location .

Change steps :

  1. Create a new folder for installing expansion packs , such as
D:\Software\Microsoft VS Code\extensions
  1. Right click to open the desktop VS Code Quick icons , Click properties

 Insert picture description here

  1. stay The goal is Add the expansion pack installation path to the location
"D:\Software\Microsoft VS Code\Code.exe" --extensions-dir "D:\Software\Microsoft VS Code\extensions"
  1. Click on determine Button , after , Double click the shortcut icon on the desktop again to open VS Code, Install the expansion pack , The installation location is the location of our custom settings
原网站

版权声明
本文为[Xuan Juan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070721297464.html