Skip to content

Commit 6468902

Browse files
Merge pull request #9 from cinnamon-msft/cinnamon/updates
Refresh lab instructions
2 parents bb6a2bb + ddd677f commit 6468902

15 files changed

Lines changed: 37 additions & 63 deletions

lab/images/0-enable-nes.png

-10.3 KB
Loading
-191 KB
Loading
13.5 KB
Loading

lab/part00-exploring-codebase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
GitHub Copilot Chat allows you to ask questions about your code and get intelligent responses.
44

55
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.
77
![Open chat window dialog](./images/1-open-copilot-chat.png)
88
1. [] Ensure that you are in **Ask** mode by clicking on the **Ask** tab at the bottom of the chat window.
99
![Ask mode tab](./images/0-ask-mode.png)

lab/part01-code-completion.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ In this section, you'll use GitHub Copilot's code completion to implement API en
44

55
> 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.
66
7-
1. [] Stop debugging the appliaction if it is currently running.
7+
1. [] Stop debugging the application if it is currently running.
88

99

1010
1. [] In the Solution Explorer, in the **Products** project, open **Endpoints/ProductEndpoints.cs** - it will have a single endpoint implemented.
1111

1212
> Note: GitHub Copilot will not give code suggestions when debugging.
1313
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:
1515
```csharp
1616
g
1717
```
@@ -36,7 +36,7 @@ In this section, you'll use GitHub Copilot's code completion to implement API en
3636
- ![Switch to agent mode](./images/1-agent.png)]
3737
- 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?`
3838

39-
The end code in **ProductEndpoints.cs** sould look similar to:
39+
The end code in **ProductEndpoints.cs** should look similar to:
4040

4141
```csharp
4242
group.MapGet("/", async (ProductDataContext db) =>

lab/part02-enhancing-ui.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Now, you'll improve the loading experience using Copilot's inline chat.
77
1. [] In the **Solution explorer** under the **Store** project open **Components/Pages/Products.razor**.
88
1. [] Find the "Loading..." text in the code.
99
1. [] Select this text and right-click.
10-
1. [] Choose "Ask Copilot" or press `Alt+/`.
10+
1. [] Choose "Chat" or press `Alt+/`.
1111
1. [] In the inline chat, type: `Update this razor to have a simple spinner style, using built in bootstrap styles.`
1212

1313
![Screenshot of VS with inline chat](./images/2-inline-code.png)

lab/part04-custom-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ There are always key pieces of information anyone generating code for your codeb
44

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

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

99
> [!IMPORTANT]
1010
> 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).

lab/part05-implementing-features.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Part 05: Implementing Features with Copilot Agent
22

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

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

@@ -16,15 +16,15 @@ Let's add the ability to see a list of images into the app:
1616

1717
![New chat icon in VS copilot](./images/5-new-edits.png)
1818

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

21-
![Select Sonnet in Copilot](./images/5-select-sonnet.png)
21+
![Select Opus in Copilot](./images/5-select-sonnet.png)
2222

2323
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.`
2424

2525
> 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.
2626
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.
2828
2929
Copilot agent mode begins implementing the code suggestions!
3030

lab/part06-copilot-vision.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In this section, you'll use Copilot Vision. You can share screenshots of errors
99

1010
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.`
1111
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.
1313

1414
> Note: continue to iterate with Copilot Agent if it isn't to your liking.
1515

lab/part07-debugging-with-copilot.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
In this section, you'll learn how to use Copilot to debug an exception in your application.
44

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.
66
1. [] Click on the **Go to About** button in the navigation menu.
77
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.
99

10-
![Pop up for exception with Ask Copilot option](./images/7-ask-copilot-exception.png)
10+
![Pop up for exception with Analyze with Copilot option](./images/7-ask-copilot-exception.png)
1111

1212
1. [] Review how Copilot brings in debugger information, including stack traces and variable states.
1313
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
1818

1919
In this subsection, you'll learn how to use Copilot to analyze variables using watch windows and visualizers.
2020

21-
1. [] Open the **Products.razor** file again from the **Products** projet.
21+
1. [] Open the **Products.razor** file again from the **Products** project.
2222
1. [] Add a breakpoint at the end of the **OnInitializedAsync** method.
2323
1. [] Debug the **TinyShop.AppHost** and open the **store** from the .NET Aspire dashboard, and navigate to the **Products** page.
2424
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
3434
![View button on products](./images/7-view-products.png)
3535

3636
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`
3838
1. [] Observe how Copilot generates the appropriate expression automatically.
3939

40-
![Sparkle icon for visualizer](./images/7-visualizer-sparkle.png)
41-
42-
1. [] Click **Continue in Chat** to have Copilot provide the equivalent LINQ query for the same filter criteria.
40+
![Generate expression for visualizer](./images/7-visualizer-sparkle.png)
4341

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

0 commit comments

Comments
 (0)