BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Adds Custom Copilot Agents for .NET Developers with C# and WinForms Experts

Microsoft Adds Custom Copilot Agents for .NET Developers with C# and WinForms Experts

Listen to this article -  0:00

Microsoft and GitHub have expanded the Copilot ecosystem with the first .NET-focused GitHub Copilot custom agents, designed to improve productivity and code quality for C# and Windows Forms developers. The announcement, part of the broader Copilot custom agents’ rollout, introduces two purpose-built agents: C# Expert and WinForms Expert in the form of agent instruction Markdown files.

The C# Expert agent is designed to guide and enforce modern C# best practices. It respects project conventions, minimises unnecessary code artefacts such as unused interfaces or parameters, and emphasises async/await patterns with proper cancellation and exception handling. It also supports behaviour-driven and integration testing workflows, helping developers write cleaner and more maintainable code.

The WinForms Expert agent focuses on traditional desktop UI development with Windows Forms. It brings expertise in common UI design patterns such as MVVM and MVP, assists with complex event wiring and state management, and adds safeguards to prevent Copilot from inadvertently modifying .Designer.cs files in ways that would break the Visual Studio designer. This protection has been a frequent pain point for developers using generative tooling.

To use these agents, developers download the CSharpExpert.agent.md and WinFormsExpert.agent.md files from the GitHub awesome-copilot repository and place them into a .github/agents folder in their project. Once present, these profiles enable context-aware behaviour when assigning issues to Copilot through GitHub, and selection via dropdowns in Visual Studio Code Insiders or experimental Visual Studio builds. Copilot CLI support for /agent commands is planned for a future update.

Microsoft characterises both agents as experimental while they gather feedback on how models respond to detailed instructions. Since November, Visual Studio 2022 Insiders version 17.14.21 can automatically attach the relevant custom agent to a project when developers turn on the feature flag that enables project-specific .NET guidance, such as instructions tailored for Windows Forms development.

Early social media commentary, particularly on LinkedIn, reflects enthusiasm and professional interest in the custom agents’ announcement. One commenter highlighted the importance of mitigating ‘AI-induced technical debt’ by reducing unused code generation. He also noted the WinForms Expert’s protective behaviour around designer files as a significant practical benefit for legacy UI maintenance and modernisation.

Comparatively, Copilot custom agents represent a more structured and persistent approach to AI assistance than earlier Copilot chat modes or context-free suggestion engines. While traditional chat modes offer on-demand help, custom agents operate with predefined expertise and behaviour profiles tied to the repository context. This aligns Copilot more closely with the emerging agent-based developer experience, where tools act as collaborators with specific domain knowledge rather than generic assistants.

At this stage, the custom agents serve niche but high-impact scenarios within .NET development. Their experimental status and evolving tool support suggest Microsoft is listening closely to developer feedback before broadening coverage or standardising workflows across broader Copilot experiences.

About the Author

Rate this Article

Adoption
Style

BT