Skip to content

Commit

Permalink
Merge pull request #9818 from MicrosoftDocs/main638362731933759205syn…
Browse files Browse the repository at this point in the history
…c_temp

For protected branch, push strategy should use PR and merge to target branch method to work around git push error
  • Loading branch information
learn-build-service-prod[bot] authored Nov 22, 2023
2 parents c8b8c62 + d3334b7 commit 45a0819
Showing 1 changed file with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Develop code without projects or solutions
description: Learn how to develop code directly in Visual Studio without a need for projects or solutions.
ms.date: 04/29/2022
ms.date: 11/7/2023
ms.topic: how-to
helpviewer_keywords:
- open folder [Visual Studio]
Expand Down Expand Up @@ -40,6 +40,33 @@ You can open code into Visual Studio in the following ways:

- Open code from a cloned GitHub repo.

### To open multiple folders
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.
- On the Visual Studio menu bar, choose **File** > **Open** > **Workspace**, and then browse to the `.code-workspace` file location.
- The `.code-workspace` file itself is expected to be a .JSON schema, which looks like the following:

```json
{
"folders" : [
{
"path" : "some\\child\\foo",
"name" : "The Foo"
},
{
"path" : "..\\..\\some\\unrelated\\bar"
},
{
"path" : "C:\\a\\full\\path\\baz"
},
{
"path" : "${env.ANY_ENV_VARIABLE}\\foobar"
}
]
}
```

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.

### To open code from a cloned GitHub repo

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.
Expand Down

0 comments on commit 45a0819

Please sign in to comment.