A two-day hands-on workshop covering the full range of GitHub Copilot capabilities in Visual Studio: intelligent completions, chat, refactoring, debugging, test creation, agent mode, MCP, the Copilot CLI, and model selection — with an optional session on the autonomous GitHub Copilot Coding Agent.
GitHub Copilot Workshop with Visual Studio
Duration: 2 days
Course Description
A hands-on two-day workshop covering the full range of GitHub Copilot capabilities inside Visual Studio: intelligent completions, chat-driven code generation, refactoring, debugging, test creation, modernization, agent mode, MCP, the Copilot CLI, customization, and model selection. The optional Day 2 afternoon adds the GitHub Copilot Coding Agent (requires a GitHub-hosted repository with GitHub Actions enabled).
Important: An active GitHub Copilot subscription is required. Exercise material is provided by the trainer.
Learning Objectives
Participants will be able to:
- Use inline completions, Copilot Chat, inline chat, smart actions, and Edits mode effectively in Visual Studio.
- Generate code, refactor, explain, and create tests with Copilot assistance.
- Diagnose and fix bugs using Copilot Chat and the Visual Studio debugger integration.
- Modernize legacy .NET applications and interpret performance profiling results with Copilot.
- Enable agent mode and configure MCP servers and CLI-based tool commands.
- Use the standalone GitHub Copilot CLI for terminal-based tasks.
- Customize Copilot via instruction files, scoped instructions, prompt files, and
AGENTS.md. - Select the right AI model for different task types.
- (Optional) Use the GitHub Copilot Coding Agent for autonomous planning, implementation, and AI-assisted code review on GitHub.
Target Audience
.NET developers and Visual Studio users at any experience level with AI tools who want to integrate GitHub Copilot into their daily workflow. No GitHub-hosted repository is required for the core two days.
Prerequisites
- Familiarity with Visual Studio (any recent edition) and basic git/GitHub workflows.
- Experience with at least one language supported in Visual Studio (C#, C++, VB.NET, etc.).
- An active GitHub Copilot subscription is required (Individual, Business, or Enterprise). Participants without a subscription will not be able to complete the hands-on labs.
- Visual Studio 2026 with the GitHub Copilot and GitHub Copilot Chat extensions installed before the workshop begins.
Agenda
Why Copilot? — AI landscape, common concerns (job security, IP, quality), developer upskilling.
Getting Started — Installing extensions, interaction modes overview, how LLMs work and their limitations, bridging gaps with tools and MCP.
Code Generation and Completions — Ghost-text completions, scaffolding methods/classes/boilerplate from comments and prompts. Lab: generate a feature end-to-end.
Refactoring with Copilot — Rename, restructure, apply patterns (Strategy, Repository), extract methods. Lab: refactor a legacy class.
Finding and Fixing Bugs — Explain errors and stack traces, request fixes, Visual Studio debugger integration ("Ask Copilot" in the exception helper, Watch/Locals analysis). Lab: diagnose a broken sample with Chat and the debugger.
Code Explanations — "What does this do?", generating XML doc comments, exploring third-party libraries via chat.
AI-Assisted Test Creation — Generate xUnit/MSTest/NUnit stubs, edge-case and boundary tests, mock dependencies. Lab: write a test suite for a service class.
Interaction Modes in Depth — Inline completions, Chat window (
#file,#solution,#selection),@githubparticipant, inline chat (Alt+/), smart actions, Edits mode.Agent Mode, Tools, MCP, and Skills — Agent mode for autonomous multi-step tasks; built-in tools (file editing, terminal, web search); CLI commands as lightweight LLM tools; MCP server configuration; Copilot Extensions and Skills; partner agents (Claude, Codex) via GitHub Agent HQ. Labs: agent mode task; MCP server vs. CLI command comparison.
Copilot Beyond the IDE — Copilot surface landscape; GitHub Copilot CLI (
copilot, Node.js 22+, no repo required): explain commands, scaffold code, agentic terminal tasks, repo-enhanced mode; GitHub.com Chat for browser-based review. Lab: install CLI, explain a compiler error, scaffold a class.Modernizing Apps with Copilot — GitHub Copilot Modernize (
modernize-dotnet):assessment.md,plan.md, incremental commits tracked intasks.md; adopting modern C# features; replacing deprecated NuGet packages. Lab: migrate a .NET Framework app to .NET 10.Performance Analysis with Copilot — Copilot in the Visual Studio Performance Profiler: CPU hotspots, memory graphs, async call trees, GC pressure, optimization suggestions. Lab: profile an app and fix a bottleneck with Copilot.
Customizing Your Copilot Experience —
copilot-instructions.md(repo-wide); scoped instruction files (applyTofrontmatter); agent profiles;AGENTS.md(cross-tool standard); tool vs. model distinction; reusable prompt files; context window management.Choosing the Right AI Model — Available models (GPT-4o, Claude, Gemini, o1/o3); task-based selection (completions, reasoning, large-context refactoring); switching models in the Chat panel; availability per subscription tier.
⚠️ GitHub repository required. All topics starting here require source code hosted on GitHub.com with GitHub Actions enabled. Participants should push their exercise repository to GitHub before this session begins.
Coding Agent Overview — Cloud-based vs. in-IDE agent mode; triggering via GitHub issues (
@copilot), Agents tab, or Visual Studio; isolated Actions runner; enabling the agent in GitHub Settings.Phase 1 — Planning — Writing effective issues (scope, acceptance criteria); guiding via
AGENTS.mdandcopilot-instructions.md; reviewing the generatedplan.md. Lab: write an issue, assign to@copilot, review the plan.Phase 2 — Autonomous Implementation — Execution loop (plan → code → self-review → commit); monitoring via Agents tab and draft PR; steering mid-session via PR comments; initiating from Visual Studio. Lab: observe an end-to-end agent session.
Phase 3 — Review and Collaboration — Copilot Code Review (
@copilot review); human oversight and merge approval; handling incorrect output; branch protections and CodeQL as guardrails. Lab: review and merge an agent-generated PR.Multi-Agent Workflows — Assign the same issue to
@copilot,@claude, and@codexin parallel; agent selection by task type; one-implements/one-reviews collaboration; premium request budgets. Lab: compare PRs from two agents.
Hands-On Labs
- Install and configure Copilot in Visual Studio; explore all interaction modes.
- Generate a REST API controller and service class from a prompt.
- Refactor a legacy C# class using inline chat and smart actions.
- Diagnose and fix a buggy sample using Copilot Chat and the in-debugger exception helper.
- Migrate a .NET Framework application to .NET 10 with Copilot Modernize.
- Profile an application and use Copilot to identify and fix a performance bottleneck.
- Generate a full unit test suite including edge cases and mocked dependencies.
- Use
@githubto query issues and PR context from Copilot Chat. - Complete a multi-step agent mode task (terminal + file editing).
- Configure an MCP server; replicate it with a CLI command and compare the two approaches.
- Author
copilot-instructions.md, a scoped instructions file, andAGENTS.md; create a reusable prompt file. - Install the Copilot CLI; explain a compiler error and scaffold a class from the terminal.
- Switch models in the Chat panel and compare output for a reasoning task.
- (Optional) Assign an issue to
@copilot, review the plan, and observe end-to-end implementation. - (Optional) Run Copilot Code Review on an agent PR and merge after approval.
- (Optional) Compare PRs from
@copilotand@claudeassigned the same task.