Skip to content

Commit d3334b7

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
2 parents c8b8c62 + 5bfafd1 commit d3334b7

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

docs/ide/develop-code-in-visual-studio-without-projects-or-solutions.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Develop code without projects or solutions
33
description: Learn how to develop code directly in Visual Studio without a need for projects or solutions.
4-
ms.date: 04/29/2022
4+
ms.date: 11/7/2023
55
ms.topic: how-to
66
helpviewer_keywords:
77
- open folder [Visual Studio]
@@ -40,6 +40,33 @@ You can open code into Visual Studio in the following ways:
4040

4141
- Open code from a cloned GitHub repo.
4242

43+
### To open multiple folders
44+
Starting in Visual Studio 2022 version 17.9 Preview 1, you can specify multiple folders to open in Visual Studio. Opening multiple folders is especially useful in code repos with lots of unrelated code, and a developer only needs a subset to do some work.
45+
- On the Visual Studio menu bar, choose **File** > **Open** > **Workspace**, and then browse to the `.code-workspace` file location.
46+
- The `.code-workspace` file itself is expected to be a .JSON schema, which looks like the following:
47+
48+
```json
49+
{
50+
"folders" : [
51+
{
52+
"path" : "some\\child\\foo",
53+
"name" : "The Foo"
54+
},
55+
{
56+
"path" : "..\\..\\some\\unrelated\\bar"
57+
},
58+
{
59+
"path" : "C:\\a\\full\\path\\baz"
60+
},
61+
{
62+
"path" : "${env.ANY_ENV_VARIABLE}\\foobar"
63+
}
64+
]
65+
}
66+
```
67+
68+
Each `"path"` value can be any relative path or rooted path. Rooted paths must be on the same drive letter. Environment variables can be used with the syntax `${env.ANY_ENV_VARIABLE}`. The `"name"` property can be used to create a visual alias for the folder in the Solution Explorer.
69+
4370
### To open code from a cloned GitHub repo
4471

4572
The following example shows how to clone a GitHub repo and then open its code in Visual Studio. To follow this procedure, you must have a GitHub account and Git for Windows installed on your system. See [Create a GitHub account to use with Visual Studio](../version-control/git-create-github-account.md) and [Git for Windows](https://git-for-windows.github.io/) for more information.

0 commit comments

Comments
 (0)