在 Visual Studio Code 中打开多个项目/文件夹 [英] Open multiple Projects/Folders in Visual Studio Code

查看:122
本文介绍了在 Visual Studio Code 中打开多个项目/文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在单个 Visual Studio Code 实例中打开多个项目/文件夹,并在单个视图中打开多个文件?它是否有任何未来更改请求的选项?

How do I open multiple projects/folders in a single Visual Studio Code instance, and open multiple files in single view? Does it has any option for future change request?

推荐答案

更新

正如这里的其他几个答案中提到的,这个已接受"的答案已经过时,不再正确.VS Code 现在有了工作区"的概念,让您可以在同一窗口中将多个根"文件夹添加到 VS Code.

Update

As mentioned in several other answers here, this 'accepted' answer is outdated and is no longer correct. VS Code now has the concept of a 'workspace' which lets you add several 'root' folders to VS Code in the same window.

例如,当在一个文件夹中处理使用保存在不同文件夹中的共享代码的项目时,您现在可以在同一窗口中同时打开项目文件夹和共享文件夹.

For instance, when working on a project in one folder that utilizes shared code held in a different folder, you can now open both the project folder and the shared folder in the same window.

为此,您使用将文件夹添加到工作区... 命令.然后 VS Code 将此配置保存在一个带有 .code-workspace 扩展名的新文件中.如果双击该文件,VS Code 将重新打开并显示两个文件夹.

To do this you use the Add folder to Workspace... command. VS Code then saves this configuration in a new file with a .code-workspace extension. If you double-click that file, VS Code will re-open with both folders present.

Visual Studio Code 基础文章所述:

VSCode 是基于文件和文件夹的 - 您可以通过在 VSCode 中打开文件或文件夹立即开始使用."

这意味着解决方案和项目文件的概念,如 .sln 和 .csproj,在 VSCode 中没有真正的功能,除了它仅使用这些来定位和识别支持 ​​Intellisense 等的语言.

This means the concept of solution and project files, like the .sln and .csproj, have no real function in VSCode other than that it uses these only to target and identify which language to support for Intellisense and such.

简单地说,您打开的文件夹就是您使用的根目录.但是当然没有什么可以阻止您打开多个窗口.

Simply put, the folder you open is the root you work with. But of course there is nothing from stopping you to open multiple windows.

至于请求功能选项,导航到帮助 > 请求功能,这会将您重定向到 VSCode 的 UserVoice 页面.

As for the request features options, navigate to Help > Request Features which will redirect you to the UserVoice page of VSCode.

这篇关于在 Visual Studio Code 中打开多个项目/文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆