windows Visual Studio Code 安装位置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30263459/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 19:04:03  来源:igfitidea点击:

Visual Studio Code install location

windowsvisual-studio-code

提问by Shaun Luttin

I installed Visual Studio Code a few days ago, and now I can't find the executable on my machine. Where is it?

几天前我安装了 Visual Studio Code,现在我在我的机器上找不到可执行文件。它在哪里?

I have checked Programs and Features. I have also checked my PATH. For some reason it isn't in either.

我已经检查了程序和功能。我还检查了我的 PATH。出于某种原因,它也不在。

回答by Marco

Update 10.11.2018

2018 年 11 月 10 日更新

If you do a complete re-install, including uninstalling prior versions of code installed on your machine the new version will be installed at

如果您进行完整的重新安装,包括卸载您机器上安装的先前版本的代码,新版本将安装在

C:\Users\{UserName}\AppData\Local\Programs\Microsoft VS Code


Update 06.07.2018

2018 年 7 月 6 日更新

Since Version 1.25 VS Code supports portable mode. Instructions on how to use this are documented here.

从 1.25 版 VS Code 开始支持可移植模式。此处记录有关如何使用它的说明。

You will need the ZIP file download version - not the installer. After unzipping the contents of the archive, create a data folder inside the folder, where code.exe is located. All settings will now be saved there and can be brought along with you.

您将需要 ZIP 文件下载版本 - 而不是安装程序。解压存档内容后,在文件夹内创建一个数据文件夹,code.exe 所在的位置。所有设置现在都将保存在那里,可以随身携带。

|- VSCode-win32-x64-1.25.0-insider
|   |- Code.exe (or code executable)
|   |- data
|   |- ...

On macOS, the folder must be named code-portable-dataand has to be a sibling of the app itself. Not inside the app.

在 macOS 上,文件夹必须命名code-portable-data并且必须是应用程序本身的同级。不在应用程序内。

|- Visual Studio Code.app
|- code-portable-data

The reasoning behind this can be read here: What is VSCode User Setup for Windows?

这背后的原因可以在这里阅读:什么是 Windows 的 VSCode 用户设置?



Update

更新

If you are using the x64 version, the path is:

如果您使用的是 x64 版本,则路径为:

C:\Program Files\Microsoft VS Code\
C:\Program Files\Microsoft VS Code\Code.exe   


Original answer

原答案

At this point and time (Version 1.19.2) Vs code no longer resides in your AppData folder, but under

此时 ( Version 1.19.2) Vs 代码不再驻留在您的 AppData 文件夹中,而是在

C:\Program Files (x86)\Microsoft VS Code\
C:\Program Files (x86)\Microsoft VS Code\Code.exe   

回答by Cody MacPixelface

I used the new VSCode User Setup installeron Windows 10, and found the executable here:

我在 Windows 10 上使用了新的VSCode 用户设置安装程序,并在此处找到了可执行文件:

C:\Users\my-username\AppData\Local\Programs\Microsoft VS Code\

回答by Shaun Luttin

Okay. I found it in the docs.

好的。我在文档中找到了它

C:\Users\my.user\AppData\Local\Code\app-0.1.0

回答by Suman

There are two types of installer available for VSCode. Go to linkto find type of installer you want.

VSCode 有两种类型的安装程序可用。转到链接以查找所需的安装程序类型。

If you are using/going for User Installer, the version will be installed at:

如果您正在使用/使用User Installer,则该版本将安装在:

C:\Users\{UserName}\AppData\Local\Programs\Microsoft VS Code

If you are using/going for 64bit System installer, the version will be installed at:

如果您正在使用/使用64 位系统安装程序,则该版本将安装在:

C:\Program Files\Microsoft VS Code\

If you are using/going for 32bit System installer, the version will be installed at:

如果您正在使用/使用32 位系统安装程序,则该版本将安装在:

C:\Program Files (x86)\Microsoft VS Code\

回答by Chris Sprague

The way I find most intuitive and easy to remember is:

我觉得最直观、最容易记住的方式是:

  1. Search for Visual Studio Code in the Windows 10 search bar -> right-click -> Open File Location

    For me this goes directly to:

    C:\Users\{YOUR_NAME}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Visual Studio Code

  2. Right-click on the shortcut -> Properties -> Start in:

    "C:\Users\{YOUR_NAME}\AppData\Local\Programs\Microsoft VS Code"

  1. 在 Windows 10 搜索栏中搜索 Visual Studio Code -> 右键单击​​ -> 打开文件位置

    对我来说,这直接指向:

    C:\Users\{YOUR_NAME}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Visual Studio Code

  2. 右键单击快捷方式 -> 属性 -> 开始于:

    “C:\Users\{YOUR_NAME}\AppData\Local\Programs\Microsoft VS Code”

回答by Greyson R.

If for some reason none of the other answers work, try this:

如果由于某种原因其他答案都不起作用,请尝试以下操作:

  1. Go into your vscode settings

  2. Find any setting that has 'Edit in settings.json' (for example - Color Customizations)

  3. Press ctrl+shift+s

  4. Go one folder up

  5. Copy + paste the file location (on the top for windows) into into another file explorer

  6. Profit

  1. 进入你的 vscode 设置

  2. 查找具有“在 settings.json 中编辑”的任何设置(例如 - 颜色自定义)

  3. 按 ctrl+shift+s

  4. 上一个文件夹

  5. 将文件位置(对于 Windows 位于顶部)复制并粘贴到另一个文件资源管理器中

  6. 利润

回答by Teodor Tite

If you prefer username-agnostic path strings:

如果您更喜欢与用户名无关的路径字符串:

  • folder: %HOMEPATH%\AppData\Local\Programs\Microsoft VS Code\

  • executable: %HOMEPATH%\AppData\Local\Programs\Microsoft VS Code\bin\code

  • 文件夹: %HOMEPATH%\AppData\Local\Programs\Microsoft VS Code\

  • 可执行文件: %HOMEPATH%\AppData\Local\Programs\Microsoft VS Code\bin\code

If you also want to use those path strings inside C#/C++ code:

如果您还想在 C#/C++ 代码中使用这些路径字符串:

  • folder: "\"%HOMEPATH%\\AppData\\Local\\Programs\\Microsoft VS Code\\\""

  • executable: "\"%HOMEPATH%\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\code\""

  • 文件夹: "\"%HOMEPATH%\\AppData\\Local\\Programs\\Microsoft VS Code\\\""

  • 可执行文件: "\"%HOMEPATH%\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\code\""

回答by Ajay Singh Meena

Why default your program would be installed here..

为什么默认你的程序会安装在这里..

C:\Program Files\Microsoft VS Code\

C:\Program Files\Microsoft VS Code\

If you have chosen different directory while installing it you can get it by:
1. Go to the icon location
2. Right click open properties
3. Check target

如果您在安装时选择了不同的目录,您可以通过以下方式获取:
1. 转到图标位置
2. 右键单击​​打开属性
3. 检查目标

回答by ijka5844

I found it at

我在

C:\Users\%username%\source\repos\Notes\%VSCode-folder%\bin\Debug\

Where %username%is the user and %VSCode-folder%is the VSCode project

%username%用户在哪里%VSCode-folder%,VSCode项目在哪里