Open multiple Projects/Folders in Visual Studio Code

前端 未结 18 1470
误落风尘
误落风尘 2020-12-12 12:23

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?

相关标签:
18条回答
  • 2020-12-12 12:53

    Update

    This is now available out of the box as of October 2017. From the blog post:

    This was our #1 feature request - it's been a while coming but it's here now.

    The complete documentation is here.

    You can work with multiple project folders in Visual Studio Code with multi-root workspaces. This can be very helpful when you are working on several related projects at one time. For example, you might have a repository with a product's documentation which you like to keep current when you update the product source code.


    Original answer

    Currently the Insider channel of VSCode gives us this out of the box.

    Read more from the blog post.

    0 讨论(0)
  • 2020-12-12 12:53

    To run one project at a time in same solution

    Open Solution explorer window -> Open Solution for Project -> Right click on it -> Select Properties from drop down list (Alt+Enter)-> Common Properties -> select Startup Project you will see "current selection,single selection and multiple selection from that select "Current Selection" this will help you to run one project at a time in same solution workspace having different coding.

    0 讨论(0)
  • 2020-12-12 12:58

    Support for multi-root workspaces is now enabled by default in the latest stable release [November 2017 release].

    The File > Add Folder to Workspace command brings up an Open Folder dialog to select the new folder.

    0 讨论(0)
  • 2020-12-12 12:59

    You can install the Open Folder Context Menus for VS Code extension from Chris Dias

    https://marketplace.visualstudio.com/items?itemName=chrisdias.vscode-opennewinstance

    • Restart Visual Studio Code
    • Right click a folder and select "Open New Workbench Here"

    Open New Workbench Here

    0 讨论(0)
  • 2020-12-12 12:59

    You can open up to 3 files in the same view by pressing [CTRL] + [^]

    0 讨论(0)
  • 2020-12-12 13:05

    If you are using unix like OS, you can create a soft link to your target folder.

    E.g. I want to see golang source while I am using VSCode. So, I create a soft link to go/src under my project folder.

    ln -s /usr/local/go/src gosrc
    

    Hope this helps!


    Update: 11/28, 2017

    Multi Root Workspaces[0] landed in the stable build, finally. https://code.visualstudio.com/updates/v1_18#_support-for-multi-root-workspaces

    [0] https://github.com/Microsoft/vscode/issues/396

    0 讨论(0)
提交回复
热议问题