Skip to content

Commit 26f5c30

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/visualstudio-docs-pr (branch live)
2 parents f8841de + 64c09fb commit 26f5c30

25 files changed

+3533
-3356
lines changed

docs/ide/code-styles-and-code-cleanup.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Code style options and code cleanup
33
description: Learn how to configure Visual Studio to apply code style preferences using the Code Cleanup (Visual Studio 2019) and Format Document (Visual Studio 2017) commands.
4-
ms.date: 10/03/2024
4+
ms.date: 11/11/2024
55
ms.topic: conceptual
66
author: mikejo5000
77
ms.author: mikejo
@@ -79,37 +79,54 @@ Starting in Visual Studio 2019 version 16.8, which includes the .NET 5.0 RC2 SDK
7979

8080
For C# code files, Visual Studio has a **Code Cleanup** button at the bottom of the editor (keyboard: **Ctrl**+**K**, **Ctrl**+**E**) to apply code styles from an EditorConfig file or from the **Code Style** options page. If an *.editorconfig* file exists for the project, those are the settings that take precedence.
8181

82-
![Screenshot of Execute code cleanup.](media/vs-2019/execute-code-cleanup.png)
83-
8482
> [!TIP]
8583
> Rules configured with a severity of **None** don't participate in code cleanup but can be individually applied via the **Quick Actions and Refactorings** menu.
8684
87-
First, configure which code styles you want to apply (in one of two profiles) in the **Configure Code Cleanup** dialog box. To open this dialog box, click the expander arrow next to the code cleanup broom icon and then choose **Configure Code Cleanup**.
85+
To apply code styles:
86+
87+
1. First, configure which code styles you want to apply (in one of two profiles) in the **Configure Code Cleanup** dialog box. To open this dialog box, click the expander arrow next to the code cleanup broom icon and then choose **Configure Code Cleanup**.
88+
89+
![Screenshot of Configure Code Cleanup.](media/vs-2019/configure-code-cleanup.png)
90+
91+
1. After you've configured code cleanup, use one of the following methods to run code cleanup:
92+
93+
- Click on the broom icon or press **Ctrl**+**K**, **Ctrl**+**E** to run code cleanup.
8894

89-
![Screenshot of Configure Code Cleanup.](media/vs-2019/configure-code-cleanup.png)
95+
![Screenshot of Execute code cleanup.](media/vs-2019/execute-code-cleanup.png)
9096

91-
After you've configured code cleanup, you can either click on the broom icon or press **Ctrl**+**K**, **Ctrl**+**E** to run code cleanup. You can also run code cleanup across your entire project or solution. Right-click on the project or solution name in **Solution Explorer**, select **Analyze and Code Cleanup**, and then select **Run Code Cleanup**.
97+
- To run code cleanup across your entire project or solution, right-click on the project or solution name in **Solution Explorer**, select **Analyze and Code Cleanup**, and then select **Run Code Cleanup**.
9298

93-
![Screenshot of Run Code Cleanup across entire project or solution.](media/vs-2019/run-code-cleanup-project-solution.png)
99+
![Screenshot of Run Code Cleanup across entire project or solution.](media/vs-2019/run-code-cleanup-project-solution.png)
94100

101+
If you want your code style settings to be applied every time you save a file, you may like the [Code Cleanup on Save](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.CodeCleanupOnSave) extension.
95102
::: moniker-end
96103

97104
::: moniker range=">=vs-2022"
98105

99106
For C# code files, Visual Studio has a **Code Cleanup** button at the bottom of the editor (keyboard: **Ctrl**+**K**, **Ctrl**+**E**) to apply code styles from an EditorConfig file or from the **Code Style** options page. If an *.editorconfig* file exists for the project, those are the settings that take precedence.
100107

101-
![Screenshot of Execute code cleanup.](media/vs-2022/execute-code-cleanup.png)
102-
103108
> [!TIP]
104109
> Rules configured with a severity of **None** don't participate in code cleanup but can be individually applied via the **Quick Actions and Refactorings** menu.
105110
106-
First, configure which code styles you want to apply (in one of two profiles) in the **Configure Code Cleanup** dialog box. To open this dialog box, click the expander arrow next to the code cleanup broom icon and then choose **Configure Code Cleanup**.
111+
To apply code styles:
112+
113+
1. First, configure which code styles you want to apply (in one of two profiles) in the **Configure Code Cleanup** dialog box. To open this dialog box, click the expander arrow next to the code cleanup broom icon and then choose **Configure Code Cleanup**.
114+
115+
![Screenshot of Configure Code Cleanup.](media/vs-2022/configure-code-cleanup.png)
116+
117+
1. After you've configured code cleanup, use one of the following methods to run code cleanup:
107118

108-
![Screenshot of Configure Code Cleanup.](media/vs-2022/configure-code-cleanup.png)
119+
- Click on the broom icon or press **Ctrl**+**K**, **Ctrl**+**E**.
109120

110-
After you've configured code cleanup, you can either click on the broom icon or press **Ctrl**+**K**, **Ctrl**+**E** to run code cleanup. You can also run code cleanup across your entire project or solution. Right-click on the project or solution name in **Solution Explorer**, select **Analyze and Code Cleanup**, and then select **Run Code Cleanup**.
121+
![Screenshot of Execute code cleanup.](media/vs-2022/execute-code-cleanup.png)
111122

112-
![Screenshot of Run Code Cleanup across entire project or solution.](media/vs-2022/run-code-cleanup-project-solution.png)
123+
- To run code cleanup across your entire project or solution, right-click on the project or solution name in **Solution Explorer**, select **Analyze and Code Cleanup**, and then select **Run Code Cleanup**.
124+
125+
![Screenshot of Run Code Cleanup across entire project or solution.](media/vs-2022/run-code-cleanup-project-solution.png)
126+
127+
If you want your code style settings to be applied every time you save a file, go to **Options** > **Text Editor** > **Code Cleanup** and select **Run Code Cleanup profile on save**.
128+
129+
::: moniker-end
113130

114131
## Code cleanup settings
115132

@@ -163,13 +180,6 @@ Most of the code cleanup settings map to one or more .NET code styles supported
163180

164181
::: moniker-end
165182

166-
::: moniker range=">=vs-2022"
167-
If you want your code style settings to be applied every time you save a file, go to **Options** > **Text Editor** > **Code Cleanup** and select **Run Code Cleanup profile on save**.
168-
::: moniker-end
169-
::: moniker range="<=vs-2019"
170-
If you want your code style settings to be applied every time you save a file, you may like the [Code Cleanup on Save](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.CodeCleanupOnSave) extension.
171-
::: moniker-end
172-
173183
## Related content
174184

175185
- [Quick Actions](../ide/quick-actions.md)

docs/ide/how-to-change-fonts-and-colors-in-visual-studio.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Change themes, fonts, text, & accessibility options in Visual Studio
33
description: Learn how to change Visual Studio color themes, font colors, text sizes, extra-contrast colors, and more for ease of use and accessibility concerns.
44
titleSuffix: ''
5-
ms.date: 9/19/2024
5+
ms.date: 11/12/2024
66
ms.topic: how-to
77
helpviewer_keywords:
88
- Visual Studio, color themes
@@ -135,6 +135,14 @@ You can change the font and text size for all the IDE frame and tool windows, or
135135

136136
1. Select the appropriate item in **Display items**, and then modify the **Item foreground** and **Item background** options.
137137

138+
### Preserve font settings across theme changes
139+
140+
With Visual Studio 2002 version 17.12, you can now preserve your font and font size preferences across theme changes. This functionality is enabled by default. When you switch themes in Visual Studio, your custom font face and size settings remain unchanged, while the font color updates with the new theme.
141+
142+
If you prefer to have font selections change with the theme, select **Tools** > **Manage Preview Features** and uncheck **Separate font settings from color themes selection (requires restart)**.
143+
144+
:::image type="content" source="media/vs-2022/preserve-font-settings-across-themes.png" alt-text="Screenshot of the setting that enables preserving font settings across themes.":::
145+
138146
::: moniker-end
139147

140148
::: moniker range="<=vs-2019"
Loading
Loading
Loading
Loading

docs/ide/reference/fonts-and-colors-environment-options-dialog-box.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Fonts and Colors, Environment, Options dialog box
33
description: Learn how to use the Fonts and Colors page in the Environment section to establish a custom font and color scheme for various user interface elements in the IDE.
4-
ms.date: 12/02/2022
4+
ms.date: 11/12/2024
55
ms.topic: reference
66
f1_keywords:
77
- VS.ToolsOptionsPages.FontsAndColors
@@ -92,15 +92,11 @@ Some of display items include:
9292
|**Selected Text**|Text that is included in the current selection when the editor has focus.|
9393
|**Inactive Selected Text**|Text that is included in the current selection when the editor has lost focus.|
9494
|**Indicator Margin**|The margin at the left of the Code Editor where breakpoints and bookmark icons are displayed.|
95-
|**Line Numbers**|Optional numbers that appear next to each line of code|
95+
|**Line Number**|Optional numbers that appear next to each line of code|
9696
|**Visible White Space**|Spaces, tabs and word wrap indicators|
9797
|**Bookmark**|Lines that have bookmarks. **Bookmark** is only visible if the indicator margin is disabled.|
9898
|**Brace Matching (Highlight)**|Highlighting that is typically bold formatting for matching braces.|
9999
|**Brace Matching (Rectangle)**|Highlighting that is typically a grey rectangle in the background.|
100-
|**Breakpoint (Disabled)**|Not used.|
101-
|**Breakpoint (Enabled)**|Specifies the highlight color for statements or lines containing simple breakpoints. This option is applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
102-
|**Breakpoint (Error)**|Specifies the highlight color for statements or lines containing breakpoints that are in an error state. Applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
103-
|**Breakpoint (Warning)**|Specifies the highlight color for statements or lines containing breakpoints that are in a warning state. Applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
104100
|**Breakpoint - Advanced (Disabled)**|Specifies the highlight color for statements or lines containing disabled conditional or hit-counted breakpoints. Applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
105101
|**Breakpoint - Advanced (Enabled)**|Specifies the highlight color for statements or lines containing conditional or hit-counted breakpoints. Applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
106102
|**Breakpoint - Advanced (Error)**|Specifies the highlight color for statements or lines containing conditional or hit-counted breakpoints that are in an error state. Applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
@@ -109,12 +105,18 @@ Some of display items include:
109105
|**Breakpoint - Mapped (Enabled)**|Specifies the highlight color for statements or lines containing mapped breakpoints. Applicable for ASP or ASP.NET debugging if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
110106
|**Breakpoint - Mapped (Error)**|Specifies the highlight color for statements or lines containing mapped breakpoints in an error state. Applicable for ASP or ASP.NET debugging if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
111107
|**Breakpoint - Mapped (Warning)**|Specifies the highlight color for statements or lines containing mapped breakpoints in a warning state. Applicable for ASP or ASP.NET debugging if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
108+
|**Breakpoint (Disabled)**|Not used.|
109+
|**Breakpoint (Enabled)**|Specifies the highlight color for statements or lines containing simple breakpoints. This option is applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
110+
|**Breakpoint (Error)**|Specifies the highlight color for statements or lines containing breakpoints that are in an error state. Applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
111+
|**Breakpoint (Warning)**|Specifies the highlight color for statements or lines containing breakpoints that are in a warning state. Applicable only if statement-level breakpoints are active or the **Highlight entire source line for breakpoints or current statement** option is selected on [General, Debugging, Options Dialog Box](../../debugger/general-debugging-options-dialog-box.md).|
112112
|**C/C++ User Keywords**|A constant within a particular code file defined by means of the `#define` directive.|
113113
|**Call Return**|Specifies the highlight color for source statements or lines that indicate call return points when context is switched to a non-top stack frame when debugging.|
114114
|**Code Snippet Dependent Field**|A field that will be updated when the current editable field is modified.|
115115
|**Code Snippet Field**|Editable field when a code snippet is active.|
116-
|**Collapsible Text**|A block of text or code that can be toggled in and out of view within the Code Editor.|
117-
|**Comment**|Code comments.|
116+
|**Collapsed Text (Collapsed)**|A block of text or code that can be toggled in and out of view within the Code Editor.|
117+
|**Collapsed Text (Expanded)**|A block of text or code that can be toggled in and out of view within the Code Editor.|
118+
|**Collapsed Text Indicator (Collapsed)**|Sets custom or predefined colors for the collapsed indicators in the Editor.|
119+
|**Collapsed Text Indicator (Expanded)**|Sets custom or predefined colors for the expanded indicators in the Editor.|
118120
|**Compiler Error**|Blue squiggles in the editor indicating a compiler error.|
119121
|**Coverage Not Touched Area**|Code that has not been covered by a unit test.|
120122
|**Coverage Partially Touched Area**|Code that has been partially covered by a unit test.|

docs/ide/visual-studio-github-copilot-chat.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: About GitHub Copilot Chat in Visual Studio
33
description: Learn about the fully integrated GitHub Copilot Chat in Visual Studio. Use the chat interface to ask coding-related questions from right within the IDE.
4-
ms.date: 8/13/2024
4+
ms.date: 11/12/2024
55
ms.topic: overview
66
author: anandmeg
77
ms.author: meghaanand
@@ -68,6 +68,8 @@ The chat window of Copilot Chat in Visual Studio enables you to ask your questio
6868
1. In the Copilot Chat window, type a coding related question in the **Ask Copilot** text box. Press **Enter** or select **Send** to ask your question.
6969

7070
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-chat/copilot-chat-window-ask-copilot-textbox.png" alt-text="Screenshot of Copilot Chat window.":::
71+
72+
Use the example starter prompts in Visual Studio 2022 version 17.12 and later to start exploring GitHub Copilot Chat.
7173

7274
1. If Copilot Chat offers a code suggestion you want to use, select **Copy code block** to copy the code suggestion, **Insert in new files** to insert the code suggestion in a new file, or select **Preview** to insert the code suggestion in your current code file. Using the **Preview** button lets you preview the code in the target location so you can easily see what's being updated.
7375

@@ -82,6 +84,10 @@ The chat window of Copilot Chat in Visual Studio enables you to ask your questio
8284
1. If you select **Insert in new file**, you'll see the code suggestions in a new file. The file is not saved by default.
8385

8486
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-chat/copilot-chat-window-insert-in-new-file.png" alt-text="Screenshot of code suggestions in new file in the editor." lightbox="media/vs-2022/visual-studio-github-copilot-chat/copilot-chat-window-insert-in-new-file.png":::
87+
88+
Visual Studio 2022 version 17.12 now includes [code referencing in GitHub Copilot](https://github.blog/news-insights/product-news/introducing-code-referencing-for-github-copilot/). This feature in GitHub Copilot notifies you when suggestions match public code. You can view the matching code, its source file, and any associated licensing information directly within Visual Studio. This enables you to make more informed decisions about whether to use the suggested code.
89+
90+
:::image type="content" source="media/vs-2022/visual-studio-github-copilot-chat/code-referencing.png" alt-text="Screenshot of code referencing for public code.":::
8591

8692
### Ask questions in the inline chat view
8793

docs/ide/work-with-multi-factor-authentication.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,27 @@ These errors may be caused by the following:
246246
#### Support for network related issues
247247
Network related issues are normally related to the machine or network configuration rather than Visual Studio. [Developer Community](https://developercommunity.visualstudio.com/VisualStudio) may provide some support, but it's focused on features within Visual Studio rather than machine configuration. For network-specific support, the [Microsoft Support Community](https://answers.microsoft.com/en-us) or [Technical support](https://support.serviceshub.microsoft.com/supportforbusiness/create?sapId=4fd4947b-15ea-ce01-080f-97f2ca3c76e8) can be helpful.
248248

249+
### Errors on first launch
250+
251+
You may encounter errors when launching Visual Studio for the first time. The error dialog will show the issue that prevented Visual Studio from opening.
252+
253+
#### Access denied
254+
You may see one of the following errors:
255+
256+
:::image type="content" source="media/vs-2022/access-denied-first-launch-file.png" alt-text="Screenshot showing the error Access to the path 'C:\Users\<UserName>\AppData\Local\.IdentityService\<Some file name>' is denied.":::
257+
258+
:::image type="content" source="media/vs-2022/access-denied-first-launch-directory.png" alt-text="Screenshot showing the error Access to the path 'C:\Users\<UserName>\AppData\Local\.IdentityService\' is denied.":::
259+
260+
If you encounter these errors, close any open instances of Visual Studio and delete the file or directory mentioned in the error message to resolve the issue.
261+
262+
Before deleting the file, check the security permissions on the file and consider logging a [Developer Community](https://developercommunity.visualstudio.com/VisualStudio) feedback ticket. This will help us better understand why access to these files or directories is being denied.
263+
264+
In your feedback ticket, please include the following information to help us investigate the issue:
265+
1. A description or screenshot of the groups and users with permissions for the file or directory mentioned in the error. To view this, right-click the file or directory, then select **Properties** > **Security**.
266+
1. The user account you're using to run Visual Studio.
267+
1. If the error persists when launching Visual Studio a second time.
268+
249269

250270
## Related content
251271

252-
- [Sign in to Visual Studio](signing-in-to-visual-studio.md)
272+
- [Sign in to Visual Studio](signing-in-to-visual-studio.md)

0 commit comments

Comments
 (0)