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: .github/copilot-instructions.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.date: 07-29-2025
7
7
# Copilot Instructions for `dotnet/AspNetCore.Docs`
8
8
9
9
## Introduction
10
-
This document contains repository-specific instructions for GitHub Copilot when assisting with the `dotnet/AspNetCore.Docs` repository. **Unless otherwise specified, all ".NET" references refer to modern .NET, not .NET Framework.**
10
+
This document contains general and repository-specific instructions for GitHub Copilot when assisting with the `dotnet/AspNetCore.Docs` repository. **Unless otherwise specified, all ".NET" references refer to modern .NET, not .NET Framework.**
11
11
12
12
## General Guidelines
13
13
@@ -54,12 +54,15 @@ When creating a PR for an issue:
54
54
- Specific Version: `== aspnetcore-9.0`
55
55
56
56
### Code Snippets
57
-
- For snippets **longer than 6 lines**:
58
-
- Place in separate `.cs` file in a `snippets` folder next to the Markdown file
59
-
- Create a subfolder named after the document
60
-
- For version-specific code, include a version folder
61
-
- Add a simple `.csproj` file targeting the appropriate .NET version
62
-
57
+
- For code snippets longer than 6 lines:
58
+
1. Create a subfolder named after the document the snippet supports.
59
+
1. Create a `snippets` folder inside that subfolder.
60
+
1. For the code file:
61
+
- If the snippet is not version-specific, place the code in a file with the appropriate extension (for example, `.cs` for C#) in the `snippets` folder.
62
+
- If the snippet is version-specific:
63
+
1. Create a subfolder inside the `snippets` folder named for the version (for example, `9.0` for .NET 9 or ASP.NET Core 9).
64
+
1. Place the code in a file with the correct extension inside the version subfolder.
65
+
1. Add a project file (`.csproj`) to the version subfolder targeting the matching .NET version, if necessary to run or build the snippet.
63
66
- Reference snippets using triple-colon syntax:
64
67
-**Use file-relative paths** for snippets specific to a single doc file:
0 commit comments