You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
repo update-packages fails every project in a fresh clone: it lists outdated packages before restoring, so dotnet list package finds no assets file #279
Only then does it run dotnet restore "<proj>" (line 1132).
dotnet list package does not restore. If obj/project.assets.json is missing, it reports "No assets file was found for <proj>. Please run restore before running this command." That shows up as a non-zero exit code, a JSON problems entry, or both. Either one sends line 1153 down the failure path:
RepoUpdatePackagesTests.TryParseRejectsOutputThatIsNotTheExpectedJson (KtsuTools.Test/RepoUpdatePackagesTests.cs:96) asserts that this exact "No assets file" output is rejected. The rejection is correct. The problem is that the command itself produces that state for every project that has never been restored.
Failure scenario
Clone a workspace, or run git clean -xdf.
Run ktsu repo update-packages --path <ws>.
Every project prints "Failed to list outdated packages in X.csproj", nothing is updated, and the run exits 1.
Each project gets restored after its failed listing, so the same command works the second time.
There is a related case after a git pull that changed package versions: the stale assets file makes --outdated report against the old resolved versions.
Suggested fix / acceptance criteria
Restore each project, or the solution once, before running dotnet list ... --outdated. If that restore fails, report it as that step's failure.
Remove the restore that runs after the update, or keep it only as a final check, since dotnet add package already restores.
Add a test with a fake dotnet whose list package fails until restore has run for that project. UpdatePackagesAsync should update the outdated package and return 0.
Notes: The command fails on every never-restored project, and a fresh clone or CI checkout is exactly that state. So the first run always fails, and it only works on a second run. The fix is small: restore before dotnet list --outdated. The proposed fake-dotnet test fits the existing RepoUpdatePackagesTests setup.
Activity
matt-edmondson commentedon Oct 17, 2026
Triage
KtsuTools.Repo:RepoService.UpdateSolutionPackagesAsyncandUpdateProjectOutdatedPackagesAsyncktsu repoverbs. It touches the sameUpdatePackagesAsyncpath as repo pull, repo build and repo update-packages exit 0 with "nothing found" when --path does not exist #281, so the two could ship together.Notes: The command fails on every never-restored project, and a fresh clone or CI checkout is exactly that state. So the first run always fails, and it only works on a second run. The fix is small: restore before
dotnet list --outdated. The proposed fake-dotnettest fits the existingRepoUpdatePackagesTestssetup.Generated by Claude Code