trace_restore

[solution]

Restores packages with dotnet restore (or a workspace-local NuGet.exe with runner 'nuget' for packages.config solutions), separating NU warnings from failures, and stores a GliderTrace restore session with a structured restored/up-to-date/failed summary.

Why this tool exists

Restore failures and NU warnings decide whether a build can even start, and they are easy to lose in console output.

How it helps the agent

The model gets a restored/up-to-date/failed summary with NU warnings separated from failures before attempting a build.

Try it locally in the GliderTrace playground

Parameters

NameTypeRequiredDescription
targetPathstringNoOptional solution, project, directory, or (with runner 'nuget') packages.config path under the workspace root. Defaults to the workspace root.
runnerstringNoRestore runner: 'auto' (default, dotnet restore) or 'nuget' (a workspace-local .nuget\NuGet.exe; requires the server started with --allow-executable nuget-workspace).
nugetConfigPathstringNoOptional NuGet configuration file under the workspace root, mapped to --configfile / -ConfigFile.
packagesDirectorystringNoOptional packages directory under the workspace root, mapped to --packages / -PackagesDirectory.
lockedModebooleanNoFail when the lock file is out of date (--locked-mode / -LockedMode). Defaults to false.
disableParallelProcessingbooleanNoDisable parallel restore (--disable-parallel / -DisableParallelProcessing). Defaults to false.
environmentjsonNoOptional environment variables to set for the restore process.
timeoutMsnumberNoOptional restore timeout in milliseconds. When exceeded the session completes with status timeout.
summaryLimitnumberNoMaximum diagnostics returned in topFindings, errors first. Clamped to 1..100. Defaults to 20.

Examples

Restore the workspace with dotnet restore

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "trace_restore",
    "arguments": {}
  }
}

Restore a packages.config solution with the workspace NuGet.exe

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "trace_restore",
    "arguments": {
      "runner": "nuget",
      "targetPath": "MyApp.sln"
    }
  }
}

Response Notes

Returns a restore session id, status, exit code, restoredProjects/upToDateProjects/failedProjects/nuWarningCount/nuErrorCount/restoreSucceeded summary, errors-first topFindings, and (dotnet runner) a sensitive restore.binlog artifact reference.

↑/↓ NavigateEnter OpenSpace Expand