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
- Check out
main (or open any PR — the build-and-test job runs dotnet restore).
- Run
dotnet restore against Ziyada.sln on a machine/runner where the latest Terminal.Gui 2.x is 2.4.17.
- 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.
Describe the bug
dotnet restorefails onmain, which makes thebuild-and-testCI job (.github/workflows/ci.yml) go red on every push/PR. Bothsrc/Ziyada/Ziyada.csprojandtests/Ziyada.Tests/Ziyada.Tests.csprojdeclare a floating package reference<PackageReference Include="Terminal.Gui" Version="2.*" />. That wildcard now resolves to Terminal.Gui2.4.17, which droppednet9.0support and targetsnet10.0only. Since both projects targetnet9.0, NuGet restore fails withNU1202.This is unrelated to any single change — it will fail on any branch/PR until the version is constrained.
Steps to reproduce
main(or open any PR — thebuild-and-testjob runsdotnet restore).dotnet restoreagainstZiyada.slnon a machine/runner where the latestTerminal.Gui 2.xis2.4.17.NU1202for both the app and test projects.Expected behavior
dotnet restore/dotnet build/dotnet testsucceed onmain, and thebuild-and-testCI check is green.Screenshots / Terminal output
From the failing CI run (PR #36, run 29952517177):
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.csprojfiles pulls the newestTerminal.Gui 2.x, which is now2.4.17(net10.0-only).Suggested fixes (pick one):
<PackageReference Include="Terminal.Gui" Version="2.4.16" />(lastnet9.0-compatible release) — or a fixed range such as[2.4.16]— in bothsrc/Ziyada/Ziyada.csprojandtests/Ziyada.Tests/Ziyada.Tests.csproj, ornet10.0(bump<TargetFramework>in both projects, and alignsetup-dotnet/copilot-setup-stepsto the10.0.xSDK).Pinning to
2.4.16is the lower-risk fix; retargeting tonet10.0is 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.