Skip to content

fix(labs): bộ chấm lab và HeadlessLab chỉ chọn AutoCAD 2021–2024 - #40

Merged
Tmphi merged 1 commit into
mainfrom
fix/lab-autocad-range
Oct 16, 2026
Merged

Tmphi merged 1 commit into
mainfrom
fix/lab-autocad-range

Conversation

@Tmphi

@Tmphi Tmphi commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Sửa lưu ý số 1 trước khi dùng tài liệu cho training.

Vấn đề

  • labs/run-lab.ps1 và tests/integration/run-headless-lab.ps1 tự chọn bản AutoCAD mới nhất đã cài. Máy có cả AutoCAD 2024 lẫn 2025 thì chúng chọn 2025.
  • DLL lab và HeadlessLab đều là net48 build với API AutoCAD 2024. AutoCAD 2025 trở đi chạy .NET 8, nên không nạp được DLL đó.
  • labs/README lại ghi "AutoCAD 2021 trở lên", tức sai với bản 2025+.

Sửa

  • Hai runner chỉ tự chọn bản mới nhất trong khoảng 2021–2024, theo tên thư mục AutoCAD 20xx và chỉ khi có accoreconsole.exe. -AcCorePath vẫn chọn tay được.
  • Không có bản nào trong khoảng đó thì báo lỗi kèm lý do (2025+ chạy .NET 8).
  • labs/README, training/README §4 và README của tests/integration ghi rõ giới hạn 2021–2024. run-integration-tests.ps1 giữ nguyên, vì nó có tham số riêng -TargetFramework net8.0-windows cho 2025+.

Đã kiểm

  • Logic chọn, thử trên một cây thư mục giả:
    • có 2020, 2023, 2024, 2025, "AutoCAD 2024 Beta" → chọn 2024;
    • bỏ 2024 → chọn 2023;
    • chỉ còn 2020, 2025, bản Beta và một thư mục 2022 không có accoreconsole.exe → không chọn gì.
  • Trên máy thật vẫn chọn AutoCAD 2024: run-lab.ps1 -Lab L06 -Solution đạt 2/2, run-headless-lab.ps1 đạt 22/22.
  • Hai file .ps1 vẫn giữ BOM. npm run links và reading-time: 0 lỗi.

🤖 Generated with Claude Code

run-lab.ps1 and run-headless-lab.ps1 picked the newest AutoCAD installed,
so a machine with 2024 and 2025 chose 2025, which runs .NET 8 and cannot
load the net48 DLLs built against the AutoCAD 2024 API. They now pick the
newest install between 2021 and 2024 (-AcCorePath still overrides) and
say why when none is found. labs/README said '2021 or later'; README §4
and tests/integration/README state the range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tmphi
Tmphi merged commit f6bfee5 into main Oct 16, 2026
2 checks passed
@Tmphi
Tmphi deleted the fix/lab-autocad-range branch October 16, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants