Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

ASP.NET Core container quickstart: `docker-run: debug` task sample is missing its closing brace

Đang mở Phù hợp với người mới
#10,499 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, docker, json, markdown
Lĩnh vực
documentation

Hướng nghiên cứu

Ví dụ bị lỗi là khối JSON cuối cùng trong docs/containers/quickstart-aspnet-core.md, khoảng dòng 146-163, dành cho tác vụ docker-run: debug. Hãy mở tệp đó, tìm đoạn mã kết thúc sau khối netCore và thêm dấu ngoặc nhọn đóng của đối tượng tác vụ. Hoàn thành khi đoạn mã được phân tích thành một đối tượng JSON đầy đủ, ví dụ bằng jsonc-parser, và khoảng trắng đứng trước dấu ngoặc nhọn đầu tiên đã được xóa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Page: Tutorial: Create and containerize an ASP.NET Core app (docs/containers/quickstart-aspnet-core.md)

Problem

The last JSON sample on the page, which shows how to expose a fixed host port by changing the docker-run: debug task in .vscode/tasks.json, is missing its closing }. The object opened on the first line is never closed, so the snippet is not valid JSON and can't be pasted into tasks.json as shown:

 {
    "type": "docker-run",
    "label": "docker-run: debug",
    "dependsOn": [
        "docker-build: debug"
    ],
    "dockerRun": {
        "ports": [
            { "hostPort": 5000, "containerPort": 5000 }
        ]
    },
    "netCore": {
        "appProject": "${workspaceFolder}/netcorerest.csproj",
        "enableDebugging": true
    }

The braces open 3 times ({ task, dockerRun, netCore) but close only twice (dockerRun and netCore); the closing brace of the task object is missing. The same snippet is on the published page (checked today): it ends right after the netCore block.

I found this by parsing the fenced json blocks in docs/, api/, remote/ and learn/ with jsonc-parser; most reported blocks are intentional settings fragments, but this is the one complete task object that fails with CloseBraceExpected.

Expected

The sample is a complete, valid JSON object:

{
    "type": "docker-run",
    "label": "docker-run: debug",
    "dependsOn": [
        "docker-build: debug"
    ],
    "dockerRun": {
        "ports": [
            { "hostPort": 5000, "containerPort": 5000 }
        ]
    },
    "netCore": {
        "appProject": "${workspaceFolder}/netcorerest.csproj",
        "enableDebugging": true
    }
}

(The leading space before the first { can go as well.)

Fix

Add the missing } at the end of the snippet in docs/containers/quickstart-aspnet-core.md (around line 146-163).

Ngôn ngữ chính
Markdown
Star
6.7k
Fork
5.8k
Merge trung bình
11 giờ 53 phút
Pull request đã merge (30 ngày)
137

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-docs

Tất cả issue của microsoft/vscode-docs

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.