You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/designers/windows-forms-designer-overview.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ author: ghogen
9
9
ms.author: ghogen
10
10
manager: mijacobs
11
11
ms.subservice: ui-designers
12
+
ms.custom: awp-ai
12
13
#customer intent: As a developer, I want to use Windows Forms Designer in Visual Studio, so I can arrange controls, set margins and padding, and adjust the layout, size, and display of forms.
13
14
---
14
15
# What is Windows Forms Designer?
@@ -39,8 +40,12 @@ When you work with Windows Forms Designer in Visual Studio, exercise caution in
39
40
40
41
- Resources in a _.resx_ file can be serialized by using the [BinaryFormatter](/dotnet/api/system.runtime.serialization.formatters.binary.binaryformatter) type. However, this type presents deserialization risks. The type is [insecure and not trustworthy](/dotnet/standard/serialization/binaryformatter-security-guide). Use Windows Forms Designer to work only with forms and controls that you trust.
41
42
43
+
> [!TIP]
44
+
> Use the [WinForms Expert custom agent](../ide/copilot-specialized-agents.md#winforms-expert) with GitHub Copilot for AI-assisted guidance that protects your designer code, follows modern .NET patterns, and understands WinForms layout best practices.
45
+
42
46
## Related content
43
47
44
48
-[Windows Forms overview](/dotnet/framework/winforms/windows-forms-overview)
45
49
-[Windows Forms controls](/dotnet/framework/winforms/controls/)
46
-
-[User input in Windows Forms](/dotnet/framework/winforms/user-input-in-windows-forms)
50
+
-[User input in Windows Forms](/dotnet/framework/winforms/user-input-in-windows-forms)
51
+
-[Use built-in and custom agents with GitHub Copilot](../ide/copilot-specialized-agents.md)
Copy file name to clipboardExpand all lines: docs/ide/ai-assisted-development-visual-studio.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,8 @@ GitHub Copilot and IntelliCode assist you in writing code faster and with greate
77
77
:::image type="content" source="media/vs-2022/copilot-chat-visual-studio.gif" alt-text="Animated screenshot that shows the capabilities of the GitHub Copilot Chat extension." lightbox="media/vs-2022/copilot-chat-visual-studio.gif":::
78
78
79
79
Get started with [Copilot Chat in Visual Studio](visual-studio-github-copilot-chat.md#use-copilot-chat-in-visual-studio).
80
+
81
+
-**[Did You Mean search suggestions](visual-studio-search.md#did-you-mean-code-search-suggestions-preview)** uses Copilot to intelligently detect your intent when searching for files in All-In-One Search. If you mistype a query or can't remember an exact file name, Copilot suggests better matches based on what you might have meant. This feature helps you find files faster without having to correct typos or remember exact names.
Copy file name to clipboardExpand all lines: docs/ide/copilot-edits.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,9 @@ ms.author: meghaanand
9
9
ms.manager: mijacobs
10
10
ms.subservice: ai-tools
11
11
ms.collection: ce-skilling-ai-copilot
12
-
monikerRange: '>= vs-2022'
12
+
monikerRange: 'vs-2022'
13
13
ms.custom: awp-ai
14
+
14
15
---
15
16
# What is GitHub Copilot Edits?
16
17
@@ -84,7 +85,8 @@ Select **Accept all** to accept the proposed code changes across all files where
84
85
85
86
:::image type="content" source="media/vs-2022/copilot-edits/accept-all.gif" alt-text="Animated screenshot that shows accepting all edits on all files." lightbox="media/vs-2022/copilot-edits/accept-all.gif":::
86
87
87
-
### Revert edits
88
+
89
+
## Revert edits
88
90
89
91
#### Revert to the original state
90
92
@@ -102,6 +104,7 @@ A popup dialog confirms the action before reverting file states.
102
104
103
105
:::image type="content" source="media/vs-2022/copilot-edits/reset-to-previous-iteration.png" alt-text="Screenshot that shows reverting a file to a previous iteration." lightbox="media/vs-2022/copilot-edits/reset-to-previous-iteration.png":::
Copy file name to clipboardExpand all lines: docs/ide/copilot-specialized-agents.md
+46-16Lines changed: 46 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Use custom agents in GitHub Copilot
3
3
description: Learn about built-in agents for debugging, profiling, testing, and code modernization, and how to create custom agents for your team workflows.
4
-
ms.date: 03/20/2026
4
+
ms.date: 03/25/2026
5
5
ms.topic: how-to
6
6
author: mikejo5000
7
7
ms.author: mikejo
@@ -20,7 +20,7 @@ Visual Studio includes a set of curated built-in agents that integrate deeply wi
20
20
21
21
## Prerequisites
22
22
23
-
+ Visual Studio 2022 [version 17.14](/visualstudio/releases/2022/release-history)or later
23
+
+[Visual Studio 2026](/visualstudio/releases/2026/release-notes) or [Visual Studio 2022 version 17.14](/visualstudio/releases/2022/release-history)(with the latest servicing release recommended for the most up-to-date features)
24
24
+ A [GitHub Copilot subscription](https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot)
25
25
26
26
## Access custom agents
@@ -52,14 +52,14 @@ You can access custom agents by using **@ syntax**: Type `@` followed by the age
52
52
53
53
## Built-in agents
54
54
55
-
Each built-in agent is designed around a specific developer workflow and integrates with Visual Studio's native tooling in ways that a generic assistant can't.
55
+
Each built-in agent focuses on a specific developer workflow. These agents integrate with Visual Studio's native tooling in ways that a generic assistant can't.
56
56
57
57
:::moniker range="visualstudio"
58
58
| Agent | Description |
59
59
|-------|-------------|
60
60
|**@debugger**| Goes beyond reading error messages. Uses your call stacks, variable state, and diagnostic tools to walk through error diagnosis systematically across your solution. |
61
61
|**@profiler**| Connects to Visual Studio's profiling infrastructure to identify bottlenecks and suggest targeted optimizations grounded in your codebase, not generic advice. |
62
-
|**@test**| Generates unit tests tuned to your project's framework and patterns, not boilerplate that your CI will reject. |
62
+
|**@test**| Generates unit tests tuned to your project's framework and patterns, not boilerplate that your CI rejects. |
63
63
|**@modernize**| (.NET and C++ only) Handles framework and dependency upgrades with awareness of your actual project graph. Flags breaking changes, generates migration code, and follows your existing patterns. |
64
64
::: moniker-end
65
65
@@ -115,11 +115,11 @@ For more comprehensive .NET testing support, see [GitHub Copilot testing for .NE
115
115
116
116
The @modernize agent helps with framework migrations and dependency upgrades for .NET and C++ projects.
117
117
118
-
For .NET modernization workflows, the agent can support a three-stage process:
118
+
For .NET modernization workflows, the agent supports a three-stage process:
119
119
120
-
+**Assessment**: Review package versions, target framework options, project inventory, and API compatibility risks.
121
-
+**Plan**: Generate a migration plan that aligns with the current assessment and update priorities.
122
-
+**Task execution**: Work through modernization tasks with a dynamic task file you can edit as the work progresses.
120
+
+**Assessment**: Reviews package versions, target framework options, project inventory, and API compatibility risks.
121
+
+**Plan**: Generates a migration plan that aligns with the current assessment and update priorities.
122
+
+**Task execution**: Works through modernization tasks with a dynamic task file you can edit as the work progresses.
123
123
124
124
**Example prompts**:
125
125
@@ -137,13 +137,13 @@ For end-to-end guidance on GitHub Copilot app modernization for .NET, see [GitHu
137
137
> [!NOTE]
138
138
> Custom agents require Visual Studio 2026 version 18.4 or later.
139
139
140
-
The built-in agents cover common workflows, but your team knows your workflow best. Custom agents let you build your own using the same foundation: workspace awareness, code understanding, your preferred AI model, and your own tools.
140
+
The built-in agents cover common workflows, but your team knows your workflow best. Custom agents let you build your own agents by using the same foundation: workspace awareness, code understanding, your preferred AI model, and your own tools.
141
141
142
142
Custom agents become especially powerful when combined with [MCP (Model Context Protocol)](mcp-servers.md). You can connect agents to external knowledge sources like internal documentation, design systems, APIs, and databases, so the agent isn't limited to what's in your repository.
143
143
144
144
### Create a custom agent
145
145
146
-
Custom agents are defined as `.agent.md` files in your repository's `.github/agents/` folder:
146
+
Define custom agents as `.agent.md` files in your repository's `.github/agents/` folder:
147
147
148
148
```text
149
149
your-repo/
@@ -185,10 +185,10 @@ Flag violations clearly and suggest fixes inline.
185
185
186
186
| Property | Required | Description |
187
187
|----------|----------|-------------|
188
-
|`name`| No | Display name for the agent in the agent picker. If not specified, the agent name is derived from the filename (for example, `code-reviewer.agent.md` becomes `code-reviewer`). |
188
+
|`name`| No | Display name for the agent in the agent picker. If you don't specify this property, the agent name comes from the filename (for example, `code-reviewer.agent.md` becomes `code-reviewer`). |
189
189
|`description`| Yes | Brief description shown when hovering over the agent |
190
-
|`model`| No | AI model to use. If not specified, uses the model selected in the model picker. |
191
-
|`tools`| No | Array of tool names the agent can use. If not specified, all available tools are enabled. |
190
+
|`model`| No | AI model to use. If you don't specify this property, the model selected in the model picker is used. |
191
+
|`tools`| No | Array of tool names the agent can use. If you don't specify this property, all available tools are enabled. |
192
192
193
193
### Specify tools
194
194
@@ -199,14 +199,14 @@ Tools extend what your custom agent can do. You can specify which tools the agen
199
199
200
200
### Connect to external sources with MCP
201
201
202
-
With [MCP servers](mcp-servers.md), your custom agents can access external knowledge sources:
202
+
By using [MCP servers](mcp-servers.md), your custom agents can access external knowledge sources such as:
203
203
204
204
+ Internal documentation and wikis
205
205
+ Design systems and component libraries
206
206
+ APIs and databases
207
207
+ Style guides and ADR repositories
208
208
209
-
For example, a code review agent can check PRs against your actual conventions by connecting to your style guide via MCP.
209
+
For example, a code review agent can check PRs against your actual conventions by connecting to your style guide through MCP.
210
210
211
211
### Example custom agents
212
212
@@ -292,9 +292,39 @@ Always check existing code conventions before making changes.
292
292
> [!TIP]
293
293
> Select the **Tools** icon in the Copilot Chat window to see all available tool names in your version of Visual Studio.
294
294
295
+
### .NET development agents
296
+
297
+
The .NET team maintains curated custom agents for C# and Windows Forms development in the [awesome-copilot](https://github.com/github/awesome-copilot) repository. To get started:
298
+
299
+
1. Download [CSharpExpert.agent.md](https://github.com/github/awesome-copilot/blob/main/agents/CSharpExpert.agent.md) and [WinFormsExpert.agent.md](https://github.com/github/awesome-copilot/blob/main/agents/WinFormsExpert.agent.md).
300
+
1. Add the files to your repository's `.github/agents/` folder.
301
+
1. Open Copilot Chat in agent mode and select the agent from the agent picker.
302
+
303
+
> [!TIP]
304
+
> Select **Tools** > **Options** > **GitHub** > **Copilot**, and then enable **Enable project specific .NET instructions such as Windows Forms development when applicable** to automatically add the appropriate custom agent for your code base.
305
+
306
+
#### C# Expert
307
+
308
+
The C# Expert agent applies modern C# conventions to Copilot's code generation:
309
+
310
+
+**Syntax and performance**: Follows current best practices while matching your repository's existing conventions.
311
+
+**Minimal changes**: Generates only the code needed, using async/await with proper cancellation and exception handling. Avoids unused interfaces, methods, or parameters.
312
+
+**Testing**: Supports behavior-driven unit testing, integration testing, and TDD workflows.
313
+
314
+
#### WinForms Expert
315
+
316
+
The WinForms Expert agent targets Windows Forms development on .NET 8 through .NET 10:
317
+
318
+
+**Designer code protection**: Prevents `.Designer.cs` corruption so the [Windows Forms Designer](../designers/windows-forms-designer-overview.md) keeps working after Copilot edits.
319
+
+**UI design patterns**: MVVM and MVP patterns, including Community Toolkit data binding.
320
+
+**Modern .NET**: Correct `InvokeAsync` overloads, dark mode, high-DPI awareness, and nullable reference types.
321
+
+**Layout**: `TableLayoutPanel` and `FlowLayoutPanel` for responsive, DPI-aware layouts.
322
+
+**CodeDOM serialization**: `[DefaultValue]` attributes and `ShouldSerialize*()` methods for proper designer property handling.
323
+
+**Exception handling**: Async event handler patterns and application-level exception handling.
324
+
295
325
### Community configurations
296
326
297
-
The [awesome-copilot repository](https://github.com/github/awesome-copilot) has community-contributed agent configurations you can use as starting points. When using configurations from this repository, verify tool names work in Visual Studio before deploying to your team.
327
+
The [awesome-copilot repository](https://github.com/github/awesome-copilot) has community-contributed agent configurations you can use as starting points. When you use configurations from this repository, verify tool names work in Visual Studio before deploying to your team.
Copy file name to clipboardExpand all lines: docs/ide/visual-studio-search.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@ helpviewer_keywords:
12
12
- windows [Visual Studio], navigating
13
13
- Window.QuickLaunch
14
14
- IDE navigator
15
-
monikerRange: ">=vs-2022"
16
15
author: ghogen
17
16
ms.author: ghogen
18
17
manager: mijacobs
19
18
ms.subservice: general-ide
19
+
ms.custom: awp-ai
20
20
---
21
21
# Use Visual Studio search
22
22
@@ -40,7 +40,28 @@ For example, suppose you searched for "prettify file" in Feature Search. That do
40
40
41
41
:::image type="content" source="./media/vs-2022/feature-search-ask-copilot-prettify.png" lightbox="./media/vs-2022/feature-search-ask-copilot-prettify.png" alt-text="Screenshot showing the Ask Copilot button in All-In-One Search.":::
42
42
43
-
In Code Search, if you mistype a search query, Visual Studio can often detect this and suggest a possible correction. If a variation of the text you entered returns much better results, you'll see a message ("Did you mean ... ?") that suggests the alternate query. Just click on this message to accept the suggested query and refresh the results.
43
+
### Did You Mean code search suggestions (preview)
44
+
45
+
Ever forget the name of a file while coding? The **Did You Mean** feature in Visual Studio, powered by Copilot, helps you find files even when you can't remember their exact names. When you search using All-In-One Search and Copilot detects a better match than the top result—perhaps because of a typo or a fuzzy memory—it suggests what you might have meant.
46
+
47
+
:::image type="content" source="./media/visualstudio/did-you-mean.png" alt-text="Screenshot of the Did You Mean suggestion.":::
48
+
49
+
When you type a search term, Copilot analyzes your input and suggests a more relevant term if it finds one that more closely matches your intent. This feature helps whether the search results are empty or when the top result isn't what you intended. Select the suggestion to accept it and refresh the results.
50
+
51
+
:::image type="content" source="./media/visualstudio/did-you-mean-empty.png" alt-text="Screenshot of the Did You Mean suggestion appearing when search results are empty.":::
52
+
53
+
:::image type="content" source="./media/visualstudio/did-you-mean-non-empty.png" alt-text="Screenshot of the Did You Mean feature showing an alternative suggestion when the top result doesn't match your intent.":::
54
+
55
+
**Did You Mean** speeds up your search experience by reducing the time spent correcting typos or trying to remember the correct name—making your search experience easier and more intuitive.
56
+
57
+
#### Enable or disable Did You Mean
58
+
59
+
To control this feature:
60
+
61
+
1. In Visual Studio, go to **Tools** > **Options** > **GitHub** > **Copilot** > **Search**.
62
+
1. Select or clear **Enable 'Did You Mean' Code Search Support in All-In-One Search (preview)**.
63
+
64
+
### Recently navigated files
44
65
45
66
When you open Code Search without a query, you'll see a list of your recently navigated files. These include the files you opened through Code Search, but also any other files you opened in the solution. This makes it easy to jump back to a file you were recently working on without having to remember or type the file name.
0 commit comments