Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/designers/walkthrough-windows-forms-designer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ author: ghogen
ms.author: ghogen
manager: mijacobs
ms.subservice: ui-designers
ms.custom: awp-ai
---
# Tutorial: Get started with Windows Forms Designer

Expand Down Expand Up @@ -344,3 +345,4 @@ This article has demonstrated how to construct the user interface for a simple c
- [Windows Forms controls](/dotnet/framework/winforms/controls/)
- [Accessibility for Windows Forms controls](/dotnet/framework/winforms/controls/providing-accessibility-information-for-controls-on-a-windows-form)
- [Publish by using ClickOnce](../deployment/how-to-publish-a-clickonce-application-using-the-publish-wizard.md)
- [Use .NET custom agents with GitHub Copilot](../ide/copilot-specialized-agents.md#net-development-agents)
7 changes: 6 additions & 1 deletion docs/designers/windows-forms-designer-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ author: ghogen
ms.author: ghogen
manager: mijacobs
ms.subservice: ui-designers
ms.custom: awp-ai
#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.
---
# What is Windows Forms Designer?
Expand Down Expand Up @@ -39,8 +40,12 @@ When you work with Windows Forms Designer in Visual Studio, exercise caution in

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

> [!TIP]
> 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.

## Related content

- [Windows Forms overview](/dotnet/framework/winforms/windows-forms-overview)
- [Windows Forms controls](/dotnet/framework/winforms/controls/)
- [User input in Windows Forms](/dotnet/framework/winforms/user-input-in-windows-forms)
- [User input in Windows Forms](/dotnet/framework/winforms/user-input-in-windows-forms)
- [Use built-in and custom agents with GitHub Copilot](../ide/copilot-specialized-agents.md)
2 changes: 2 additions & 0 deletions docs/ide/ai-assisted-development-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ GitHub Copilot and IntelliCode assist you in writing code faster and with greate
:::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":::

Get started with [Copilot Chat in Visual Studio](visual-studio-github-copilot-chat.md#use-copilot-chat-in-visual-studio).

- **[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.

### IntelliCode in Visual Studio

Expand Down
7 changes: 5 additions & 2 deletions docs/ide/copilot-edits.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ ms.author: meghaanand
ms.manager: mijacobs
ms.subservice: ai-tools
ms.collection: ce-skilling-ai-copilot
monikerRange: '>= vs-2022'
monikerRange: 'vs-2022'
ms.custom: awp-ai

---
# What is GitHub Copilot Edits?

Expand Down Expand Up @@ -84,7 +85,8 @@ Select **Accept all** to accept the proposed code changes across all files where

:::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":::

### Revert edits

## Revert edits

#### Revert to the original state

Expand All @@ -102,6 +104,7 @@ A popup dialog confirms the action before reverting file states.

:::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":::


## Related content

- [GitHub Copilot agent mode](copilot-agent-mode.md)
Expand Down
62 changes: 46 additions & 16 deletions docs/ide/copilot-specialized-agents.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Use custom agents in GitHub Copilot
description: Learn about built-in agents for debugging, profiling, testing, and code modernization, and how to create custom agents for your team workflows.
ms.date: 03/20/2026
ms.date: 03/25/2026
ms.topic: how-to
author: mikejo5000
ms.author: mikejo
Expand All @@ -20,7 +20,7 @@ Visual Studio includes a set of curated built-in agents that integrate deeply wi

## Prerequisites

+ Visual Studio 2022 [version 17.14](/visualstudio/releases/2022/release-history) or later
+ [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)
+ A [GitHub Copilot subscription](https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot#getting-access-to-copilot)

## Access custom agents
Expand Down Expand Up @@ -52,14 +52,14 @@ You can access custom agents by using **@ syntax**: Type `@` followed by the age

## Built-in agents

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

:::moniker range="visualstudio"
| Agent | Description |
|-------|-------------|
| **@debugger** | Goes beyond reading error messages. Uses your call stacks, variable state, and diagnostic tools to walk through error diagnosis systematically across your solution. |
| **@profiler** | Connects to Visual Studio's profiling infrastructure to identify bottlenecks and suggest targeted optimizations grounded in your codebase, not generic advice. |
| **@test** | Generates unit tests tuned to your project's framework and patterns, not boilerplate that your CI will reject. |
| **@test** | Generates unit tests tuned to your project's framework and patterns, not boilerplate that your CI rejects. |
| **@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. |
::: moniker-end

Expand Down Expand Up @@ -115,11 +115,11 @@ For more comprehensive .NET testing support, see [GitHub Copilot testing for .NE

The @modernize agent helps with framework migrations and dependency upgrades for .NET and C++ projects.

For .NET modernization workflows, the agent can support a three-stage process:
For .NET modernization workflows, the agent supports a three-stage process:

+ **Assessment**: Review package versions, target framework options, project inventory, and API compatibility risks.
+ **Plan**: Generate a migration plan that aligns with the current assessment and update priorities.
+ **Task execution**: Work through modernization tasks with a dynamic task file you can edit as the work progresses.
+ **Assessment**: Reviews package versions, target framework options, project inventory, and API compatibility risks.
+ **Plan**: Generates a migration plan that aligns with the current assessment and update priorities.
+ **Task execution**: Works through modernization tasks with a dynamic task file you can edit as the work progresses.

**Example prompts**:

Expand All @@ -137,13 +137,13 @@ For end-to-end guidance on GitHub Copilot app modernization for .NET, see [GitHu
> [!NOTE]
> Custom agents require Visual Studio 2026 version 18.4 or later.

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

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.

### Create a custom agent

Custom agents are defined as `.agent.md` files in your repository's `.github/agents/` folder:
Define custom agents as `.agent.md` files in your repository's `.github/agents/` folder:

```text
your-repo/
Expand Down Expand Up @@ -185,10 +185,10 @@ Flag violations clearly and suggest fixes inline.

| Property | Required | Description |
|----------|----------|-------------|
| `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`). |
| `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`). |
| `description` | Yes | Brief description shown when hovering over the agent |
| `model` | No | AI model to use. If not specified, uses the model selected in the model picker. |
| `tools` | No | Array of tool names the agent can use. If not specified, all available tools are enabled. |
| `model` | No | AI model to use. If you don't specify this property, the model selected in the model picker is used. |
| `tools` | No | Array of tool names the agent can use. If you don't specify this property, all available tools are enabled. |

### Specify tools

Expand All @@ -199,14 +199,14 @@ Tools extend what your custom agent can do. You can specify which tools the agen

### Connect to external sources with MCP

With [MCP servers](mcp-servers.md), your custom agents can access external knowledge sources:
By using [MCP servers](mcp-servers.md), your custom agents can access external knowledge sources such as:

+ Internal documentation and wikis
+ Design systems and component libraries
+ APIs and databases
+ Style guides and ADR repositories

For example, a code review agent can check PRs against your actual conventions by connecting to your style guide via MCP.
For example, a code review agent can check PRs against your actual conventions by connecting to your style guide through MCP.

### Example custom agents

Expand Down Expand Up @@ -292,9 +292,39 @@ Always check existing code conventions before making changes.
> [!TIP]
> Select the **Tools** icon in the Copilot Chat window to see all available tool names in your version of Visual Studio.

### .NET development agents

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:

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).
1. Add the files to your repository's `.github/agents/` folder.
1. Open Copilot Chat in agent mode and select the agent from the agent picker.

> [!TIP]
> 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.

#### C# Expert

The C# Expert agent applies modern C# conventions to Copilot's code generation:

+ **Syntax and performance**: Follows current best practices while matching your repository's existing conventions.
+ **Minimal changes**: Generates only the code needed, using async/await with proper cancellation and exception handling. Avoids unused interfaces, methods, or parameters.
+ **Testing**: Supports behavior-driven unit testing, integration testing, and TDD workflows.

#### WinForms Expert

The WinForms Expert agent targets Windows Forms development on .NET 8 through .NET 10:

+ **Designer code protection**: Prevents `.Designer.cs` corruption so the [Windows Forms Designer](../designers/windows-forms-designer-overview.md) keeps working after Copilot edits.
+ **UI design patterns**: MVVM and MVP patterns, including Community Toolkit data binding.
+ **Modern .NET**: Correct `InvokeAsync` overloads, dark mode, high-DPI awareness, and nullable reference types.
+ **Layout**: `TableLayoutPanel` and `FlowLayoutPanel` for responsive, DPI-aware layouts.
+ **CodeDOM serialization**: `[DefaultValue]` attributes and `ShouldSerialize*()` methods for proper designer property handling.
+ **Exception handling**: Async event handler patterns and application-level exception handling.

### Community configurations

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

### Limitations and notes

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/ide/media/visualstudio/did-you-mean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 23 additions & 2 deletions docs/ide/visual-studio-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ helpviewer_keywords:
- windows [Visual Studio], navigating
- Window.QuickLaunch
- IDE navigator
monikerRange: ">=vs-2022"
author: ghogen
ms.author: ghogen
manager: mijacobs
ms.subservice: general-ide
ms.custom: awp-ai
---
# Use Visual Studio search

Expand All @@ -40,7 +40,28 @@ For example, suppose you searched for "prettify file" in Feature Search. That do

:::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.":::

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.
### Did You Mean code search suggestions (preview)

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.

:::image type="content" source="./media/visualstudio/did-you-mean.png" alt-text="Screenshot of the Did You Mean suggestion.":::

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.

:::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.":::

:::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.":::

**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.

#### Enable or disable Did You Mean

To control this feature:

1. In Visual Studio, go to **Tools** > **Options** > **GitHub** > **Copilot** > **Search**.
1. Select or clear **Enable 'Did You Mean' Code Search Support in All-In-One Search (preview)**.

### Recently navigated files

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.

Expand Down