Skip to content

Commit e90f6d5

Browse files
Merge pull request #2 from copilot-dev-days/copilot/add-devcontainer-setup
Add Codespaces-first onboarding and harden devcontainer bootstrap for template forks
2 parents 6819d37 + d8d84b0 commit e90f6d5

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "Soc-Ops Blazor C#",
33
"image": "mcr.microsoft.com/devcontainers/dotnet:10.0",
4+
"remoteUser": "vscode",
45
"customizations": {
56
"vscode": {
67
"extensions": [
@@ -15,7 +16,7 @@
1516
]
1617
}
1718
},
18-
"postCreateCommand": "dotnet restore SocOps/SocOps.csproj",
19+
"postCreateCommand": "bash -lc 'sln=$(find . -maxdepth 1 -name \"*.sln\" | head -n 1); if [ -n \"$sln\" ]; then dotnet restore \"$sln\"; else dotnet restore SocOps/SocOps.csproj; fi'",
1920
"forwardPorts": [5166],
2021
"portsAttributes": {
2122
"5166": {

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ Social Bingo game for in-person mixers. Find people who match the questions and
2424

2525
- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) or higher
2626

27+
## Open in GitHub Codespaces (optional)
28+
29+
After creating your own repo from this template:
30+
31+
1. Open your repo on GitHub
32+
2. Click **Code****Codespaces****Create codespace on main**
33+
3. Wait for the devcontainer to finish setup
34+
4. From the repository root, run:
35+
```bash
36+
cd SocOps
37+
dotnet run
38+
```
39+
2740
## Run
2841

2942
```bash

workshop/01-setup.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ In this section, you'll set up your development environment and teach GitHub Cop
2626
2. Under "Build and deployment", select **GitHub Actions**
2727
3. ✅ Every commit will now publish to: `https://{username}.github.io/{repo-name}`
2828

29-
### Step 3: Clone & Open in VS Code
29+
### Step 3: Pick Your Development Environment
30+
31+
#### Option A: GitHub Codespaces (fastest)
32+
33+
1. Open your new repository on GitHub
34+
2. Click **Code****Codespaces****Create codespace on main**
35+
3. Wait for the devcontainer to finish setup
36+
37+
#### Option B: Local VS Code
3038

3139
1. Open VS Code
3240
2. Run command: `Git: Clone``Clone from GitHub`

0 commit comments

Comments
 (0)