dotnet / dotnet/AspNetCore.Docs

Improve VS Code instructions in tutorials

Open
#27,585 0 comments 0 reactions 1 assignee Claimed by @tdykstra View on GitHub
doc-enhancement Pri2
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

1. The docs recommend pressing Ctrl+F5 to generate launch.json/tasks.json, there is a better way –
a. The C# extension ideally will prompt you with “Required assets to build and debug are missing…”. If so, just click “Yes”.
-or-
b. Sometimes the C# extension will fail to put up that prompt. You can force it using “.NET: Generate Assets for Build and Debug” from the VS Code command well:
![image](https://user-images.githubusercontent.com/1569635/201230613-6b67d9a8-c856-48bc-98bd-25ad9f2ac7ce.png)

2. Modify `serverReadyAction` in launch.json to point at the swagger endpoint in Web API tutorials. Add uriFormat:
```
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)",
"uriFormat": "%s/swagger"
},
```

4. F5/Ctrl-F5 will default to launching a browser, so no need to do that

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.