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: lab/part00-exploring-codebase.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
GitHub Copilot Chat allows you to ask questions about your code and get intelligent responses.
4
4
5
5
1.[] Open the solution in Visual Studio 2026 if it is not already open.
6
-
1. Click on the Github Copilot Chat in the top-right corner of Visual Studio and select **Open Chat Window** or press `Ctrl+\+C` if Copilot chat isn't open.
6
+
1. Click on the GitHub Copilot Chat in the top-right corner of Visual Studio and select **Open Chat Window** or press `Ctrl+\+C` if Copilot chat isn't open.
Copy file name to clipboardExpand all lines: lab/part01-code-completion.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,14 @@ In this section, you'll use GitHub Copilot's code completion to implement API en
4
4
5
5
> IMPORTANT: For this exercise, **DO NOT** copy and paste the code snippet provided, but rather type it manually. This will allow you to experience code completion as you would if you were coding back at your desk. You'll likely see you only have to type a few characters before GitHub Copilot begins suggesting the rest.
6
6
7
-
1.[] Stop debugging the appliaction if it is currently running.
7
+
1.[] Stop debugging the application if it is currently running.
8
8
9
9
10
10
1.[] In the Solution Explorer, in the **Products** project, open **Endpoints/ProductEndpoints.cs** - it will have a single endpoint implemented.
11
11
12
12
> Note: GitHub Copilot will not give code suggestions when debugging.
13
13
14
-
1.[] Let's implement a new **MapGet** to get product details for a specific **id**. Move our cursor and click on line 20 under the existing **/** endpoint. Text suggestion may apprear or type:
14
+
1.[] Let's implement a new **MapGet** to get product details for a specific **id**. Move our cursor and click on line 20 under the existing **/** endpoint. Text suggestion may appear or type:
15
15
```csharp
16
16
g
17
17
```
@@ -36,7 +36,7 @@ In this section, you'll use GitHub Copilot's code completion to implement API en
36
36
-]
37
37
- Ask the agent: `Can you implement the rest of the endpoints for the Product API and also implement the ProductService to call these new endpoints in the Store project?`
38
38
39
-
The end code in **ProductEndpoints.cs**sould look similar to:
39
+
The end code in **ProductEndpoints.cs**should look similar to:
Copy file name to clipboardExpand all lines: lab/part04-custom-instructions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ There are always key pieces of information anyone generating code for your codeb
4
4
5
5
Before we begin larger updates to the site with the help of Copilot, we want to ensure Copilot has a good understanding of how we're building our application. As a result, we're going to add a Copilot instructions file to the repository.
6
6
7
-
Copilot instructions is a markdown file is placed in your **.github** folder. It becomes part of your project, and in turn is available to all contributors to your codebase. You can use this file to indicate various coding standards you wish to follow, the technologies your project uses, or anything else important for Copilot Chat to understand when generating suggestions.
7
+
Copilot instructions is a markdown file placed in your **.github** folder. It becomes part of your project, and in turn is available to all contributors to your codebase. You can use this file to indicate various coding standards you wish to follow, the technologies your project uses, or anything else important for Copilot Chat to understand when generating suggestions.
8
8
9
9
> [!IMPORTANT]
10
10
> The *copilot-instructions.md* file is included in **every** call to GitHub Copilot Chat, and will be part of the context sent to Copilot. Because there is always a limited set of tokens an LLM can operate on, a large Copilot instructions file can obscure relevant information. As such, you should limit your Copilot instructions file to project-wide information, providing an overview of what you're building and how you're building it. If you need to provide more specific information for particular tasks, you can create [prompt files](https://docs.github.com/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot?tool=vscode#about-prompt-files).
Copy file name to clipboardExpand all lines: lab/part05-implementing-features.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Part 05: Implementing Features with Copilot Agent
2
2
3
-
Previously we utilized Copilot chat, which is great for working with an individual file or asking questions about our code. However, many updates necessitate changes to multiple files throughout a codebase. Even a seemingly basic change to a webpage likely requires updating HTML, CSS, Razor, and C# files. Copilot Agent allows you to modify multiple files at once across your project, self heals, and can run commands if granted permission like installing NuGet packages.
3
+
Previously we utilized Copilot Chat, which is great for working with an individual file or asking questions about our code. However, many updates necessitate changes to multiple files throughout a codebase. Even a seemingly basic change to a webpage likely requires updating HTML, CSS, Razor, and C# files. Copilot Agent allows you to modify multiple files at once across your project, self heals, and can run commands if granted permission like installing NuGet packages.
4
4
5
5
With Copilot Agent, you will add the files which need to be updated to the context. Once you provide the prompt, Copilot Agent will begin the updates across all files in the context. It also has the ability to create new files or add files to the context as it deems appropriate.
6
6
@@ -16,15 +16,15 @@ Let's add the ability to see a list of images into the app:
16
16
17
17

18
18
19
-
1.[] At the bottom of the GitHub Copilot Chat pane, select the model (default is GPT-4o") from the dropdown list, and select **Claude 4.5 Sonnet** from the list of available models.
19
+
1.[] At the bottom of the GitHub Copilot Chat pane, select the model (default is "GPT-4o") from the dropdown list, and select **Claude Opus 4.5** from the list of available models.
20
20
21
-

21
+

22
22
23
23
1.[] Type: `Implement a simple product listing page in Products.razor that fetches products from #ProductService and displays them in a simple list with product name, description, price, and image.`
24
24
25
25
> NOTE: You should use your own phrasing when generating the prompt. As highlighted previously, part of the exercise is to become comfortable creating prompts for GitHub Copilot. One key tip is it's always good to provide more guidance to ensure you get the code you are looking for.
26
26
27
-
> NOTE: If you are asked to **Enable Claude 4.5 Sonnet for all clients** click on **Enable** button.
27
+
> NOTE: If you are asked to **Enable Claude Opus 4.5 for all clients** click on **Enable** button.
28
28
29
29
Copilot agent mode begins implementing the code suggestions!
Copy file name to clipboardExpand all lines: lab/part06-copilot-vision.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ In this section, you'll use Copilot Vision. You can share screenshots of errors
9
9
10
10
1.[] Ask: `Update the Products.razor to display products in a grid layout similar to this image. Add nice hover effects and make it responsive.`
11
11
1.[] Review the suggested code changes and implement them. It should recommend changes to both the **Products.razor** and a new **Products.razor.css**
12
-
1.[] Run the application to see the updated product grid layout. You may have to clear the browser cashe with CTRL+SHIFT+R if you don't see the css update.
12
+
1.[] Run the application to see the updated product grid layout. You may have to clear the browser cache with CTRL+SHIFT+R if you don't see the CSS update.
13
13
14
14
> Note: continue to iterate with Copilot Agent if it isn't to your liking.
Copy file name to clipboardExpand all lines: lab/part07-debugging-with-copilot.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
3
3
In this section, you'll learn how to use Copilot to debug an exception in your application.
4
4
5
-
1.[] Debug the **AppHost** project if it isn't yet, and open the **store** from teh .NET Aspire dashboard.
5
+
1.[] Debug the **AppHost** project if it isn't yet, and open the **store** from the .NET Aspire dashboard.
6
6
1.[] Click on the **Go to About** button in the navigation menu.
7
7
1.[] Observe that an exception occurs, and the application crashes.
8
-
1.[] Press the **Ask Copilot** option in the pop up.
8
+
1.[] Press the **Analyze with Copilot** option in the pop up.
9
9
10
-

10
+

11
11
12
12
1.[] Review how Copilot brings in debugger information, including stack traces and variable states.
13
13
1.[] Note how Copilot recommends a fix for the issue or provides code suggestions to resolve it.
@@ -18,7 +18,7 @@ In this section, you'll learn how to use Copilot to debug an exception in your a
18
18
19
19
In this subsection, you'll learn how to use Copilot to analyze variables using watch windows and visualizers.
20
20
21
-
1.[] Open the **Products.razor** file again from the **Products**projet.
21
+
1.[] Open the **Products.razor** file again from the **Products**project.
22
22
1.[] Add a breakpoint at the end of the **OnInitializedAsync** method.
23
23
1.[] Debug the **TinyShop.AppHost** and open the **store** from the .NET Aspire dashboard, and navigate to the **Products** page.
24
24
1.[] When the breakpoint is hit, hover over the **imagePrefix** variable.
@@ -34,12 +34,10 @@ In this subsection, you'll learn how to use Copilot to analyze variables using w
34
34

35
35
36
36
1.[] Use the visualizer to inspect the contents of the **products** collection.
37
-
1.[] Click the sparkle button and, in natural language, type: `Products that have the name outdoor in them and are under 40 dollars`
37
+
1.[] Click the Generate expression button and, in natural language, type: `Products that have the name outdoor in them and are under 40 dollars`
38
38
1.[] Observe how Copilot generates the appropriate expression automatically.
39
39
40
-

41
-
42
-
1.[] Click **Continue in Chat** to have Copilot provide the equivalent LINQ query for the same filter criteria.
40
+

43
41
44
42
**Key Takeaway**: Copilot can enhance debugging by providing detailed insights into variables through watch windows and visualizers. Copilot can simplify complex debugging tasks by generating expressions and LINQ queries based on natural language input.
0 commit comments