Skip to content

Commit bfe49de

Browse files
authored
Merge pull request #3088 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to master to sync with https://github.com/MicrosoftDocs/visualstudio-docs (branch master)
2 parents 6c4268d + 4f5709c commit bfe49de

File tree

3 files changed

+66
-3
lines changed

3 files changed

+66
-3
lines changed
23 KB
Loading

docs/ide/reference/options-text-editor-csharp-advanced.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,69 @@ Use the **Advanced** options page to modify the settings for editor formatting,
2626

2727
Enables code analysis on all files in the solution, not just open code files. For more information, see [Full solution analysis](../../code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code.md).
2828

29+
## Using Directives
30+
31+
- Place 'System' directives first when sorting usings
32+
33+
When selected, the **Remove and Sort Usings** command in the right-click menu sorts the `using` directives and places the 'System' namespaces at the top of the list
34+
35+
Before sorting:
36+
37+
```csharp
38+
using AutoMapper;
39+
using FluentValidation;
40+
using System.Collections.Generic;
41+
using System.Linq;
42+
using Newtonsoft.Json;
43+
using System;
44+
```
45+
46+
After sorting:
47+
48+
```csharp
49+
using System;
50+
using System.Collections.Generic;
51+
using System.Linq;
52+
using AutoMapper;
53+
using FluentValidation;
54+
using Newtonsoft.Json;
55+
```
56+
57+
- Separate using directive groups
58+
59+
When selected, the **Remove and Sort Usings** command in the right-click menu separates `using` directives by inserting an empty line between groups of directives that have the same root namespace.
60+
61+
Before sorting:
62+
63+
```csharp
64+
using AutoMapper;
65+
using FluentValidation;
66+
using System.Collections.Generic;
67+
using System.Linq;
68+
using Newtonsoft.Json;
69+
using System;
70+
```
71+
72+
After sorting:
73+
74+
```csharp
75+
using AutoMapper;
76+
77+
using FluentValidation;
78+
79+
using Newtonsoft.Json;
80+
81+
using System;
82+
using System.Collections.Generic;
83+
using System.Linq;
84+
```
85+
86+
- Add usings for types in reference assemblies and NuGet packages
87+
88+
When selected, a [Quick Action](../quick-actions.md) is available to install a NuGet package and add a `using` directive for unreferenced types.
89+
90+
![Quick Action to install NuGet package in Visual Studio](/docs/ide/references/media/nuget-lightbulb.png)
91+
2992
## Highlighting
3093

3194
- Highlight references to symbol under cursor
@@ -50,4 +113,4 @@ Use the **Advanced** options page to modify the settings for editor formatting,
50113
- [XML Documentation Comments (C# Programming Guide)](/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments)
51114
- [Document your code with XML comments (C# Guide)](/dotnet/csharp/codedoc)
52115
- [Set language-specific editor options](../../ide/reference/setting-language-specific-editor-options.md)
53-
- [C# IntelliSense](../../ide/visual-csharp-intellisense.md)
116+
- [C# IntelliSense](../../ide/visual-csharp-intellisense.md)

docs/profiling/profiling-feature-tour.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ While you are debugging, you can use the **Diagnostic Tools** window to analyze
2828

2929
The **Diagnostic Tools** window is often the preferred way to profile apps, but for Release builds you can also do a post-mortem analysis of your app instead. If you want more information on different approaches, see [Run profiling tools with or without the debugger](../profiling/running-profiling-tools-with-or-without-the-debugger.md). To see profiling tool support for different app types, see [Which tool should I use?](#which-tool-should-i-use).
3030

31-
> ![NOTE]
31+
> [!NOTE]
3232
> You can use the post-mortem tools with Windows 7 and later. Windows 8 and later is required to run profiling tools with the debugger (**Diagnostic Tools** window).
3333
3434
## Analyze CPU Usage
@@ -162,4 +162,4 @@ Here is a table that lists the different tools Visual Studio offers and the diff
162162
|[JavaScript Memory](../profiling/javascript-memory.md)|no|yes for HTML, no for XAML|no|
163163

164164
## See also
165-
[Debugging in Visual Studio](../debugger/debugging-in-visual-studio.md)
165+
[Debugging in Visual Studio](../debugger/debugging-in-visual-studio.md)

0 commit comments

Comments
 (0)