Skip to content

[Bug]: CI build-and-test fails to restore - Terminal.Gui 2.* resolves to net10.0-only 2.4.17 (NU1202) #37

Description

@JoshLuedeman

Describe the bug

dotnet restore fails on main, which makes the build-and-test CI job (.github/workflows/ci.yml) go red on every push/PR. Both src/Ziyada/Ziyada.csproj and tests/Ziyada.Tests/Ziyada.Tests.csproj declare a floating package reference <PackageReference Include="Terminal.Gui" Version="2.*" />. That wildcard now resolves to Terminal.Gui 2.4.17, which dropped net9.0 support and targets net10.0 only. Since both projects target net9.0, NuGet restore fails with NU1202.

This is unrelated to any single change — it will fail on any branch/PR until the version is constrained.

Steps to reproduce

  1. Check out main (or open any PR — the build-and-test job runs dotnet restore).
  2. Run dotnet restore against Ziyada.sln on a machine/runner where the latest Terminal.Gui 2.x is 2.4.17.
  3. Restore fails with NU1202 for both the app and test projects.

Expected behavior

dotnet restore / dotnet build / dotnet test succeed on main, and the build-and-test CI check is green.

Screenshots / Terminal output

From the failing CI run (PR #36, run 29952517177):

src\Ziyada\Ziyada.csproj : error NU1202: Package Terminal.Gui 2.4.17 is not compatible with net9.0 (.NETCoreApp,Version=v9.0). Package Terminal.Gui 2.4.17 supports: net10.0 (.NETCoreApp,Version=v10.0) [Ziyada.sln]
  Failed to restore src\Ziyada\Ziyada.csproj (in 3.39 sec).
tests\Ziyada.Tests\Ziyada.Tests.csproj : error NU1202: Package Terminal.Gui 2.4.17 is not compatible with net9.0 (.NETCoreApp,Version=v9.0). Package Terminal.Gui 2.4.17 supports: net10.0 (.NETCoreApp,Version=v10.0) [Ziyada.sln]
  Failed to restore tests\Ziyada.Tests\Ziyada.Tests.csproj (in 6.01 sec).
##[error]Process completed with exit code 1.

Windows version

N/A — build/CI (NuGet restore) issue; reproduces on the CI runner regardless of OS.

winget version

N/A — not a runtime/winget issue.

Ziyada version

main (AssemblyVersion 0.5.0).

Terminal application

N/A — not a runtime issue.

Additional context

Root cause: the floating Version="2.*" reference in both .csproj files pulls the newest Terminal.Gui 2.x, which is now 2.4.17 (net10.0-only).

Suggested fixes (pick one):

  • Pin to a net9.0-compatible version, e.g. <PackageReference Include="Terminal.Gui" Version="2.4.16" /> (last net9.0-compatible release) — or a fixed range such as [2.4.16] — in both src/Ziyada/Ziyada.csproj and tests/Ziyada.Tests/Ziyada.Tests.csproj, or
  • Retarget the projects to net10.0 (bump <TargetFramework> in both projects, and align setup-dotnet/copilot-setup-steps to the 10.0.x SDK).

Pinning to 2.4.16 is the lower-risk fix; retargeting to net10.0 is the forward-looking option. Discovered while merging PR #36 (Copilot cloud-sandbox setup); that PR did not touch any C#/csproj and is not the cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions