Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.DotNet.ToolPackage.ToolPackageException: The tool package could not be restored. #12166

Closed
kartheekp-ms opened this issue Oct 17, 2022 · 3 comments
Labels
Functionality:Restore Product:dotnet.exe Resolution:NeedMoreInfo This issue appears to not have enough info to take action Type:Bug WaitingForCustomer Applied when a NuGet triage person needs more info from the OP

Comments

@kartheekp-ms
Copy link
Contributor

    I just ran into another failure that seems like it could be related (this is with the aforementioned workaround applied): https://github.com/vezel-dev/niru/actions/runs/3260762897/jobs/5354602659#step:4:15
Package "sourcelink" failed to restore, due to Microsoft.DotNet.ToolPackage.ToolPackageException: The tool package could not be restored.
   at Microsoft.DotNet.Tools.Tool.Install.ProjectRestorer.Restore(FilePath project, PackageLocation packageLocation, String verbosity)
   at Microsoft.DotNet.ToolPackage.ToolPackageInstaller.InstallPackageToExternalManagedLocation(PackageLocation packageLocation, PackageId packageId, VersionRange versionRange, String targetFramework, String verbosity)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)

This one seems rare - it's the first time I've seen it since applying the workaround and it didn't happen on a subsequent run.

Originally posted by @alexrp in #12159 (comment)

@ghost
Copy link

ghost commented Oct 17, 2022

@kartheekp-ms Issue is missing Type label, remember to add a Type label

@ghost ghost added the missing-required-type The required type label is missing. label Oct 17, 2022
@ghost ghost removed the missing-required-type The required type label is missing. label Oct 17, 2022
@kartheekp-ms
Copy link
Contributor Author

kartheekp-ms commented Oct 17, 2022

@alexrp - I just created this new issue for traceability because the error message is different and https://github.com/vezel-dev/niru/actions/runs/3260762897/jobs/5354602659 log says that few dotnet tools installed successfully.

Run dotnet nuget --version # TODO: https://github.com/NuGet/Home/issues/12159
NuGet Command Line
6.4.0.94

Package "sourcelink" failed to restore, due to Microsoft.DotNet.ToolPackage.ToolPackageException: The tool package could not be restored.
   at Microsoft.DotNet.Tools.Tool.Install.ProjectRestorer.Restore(FilePath project, PackageLocation packageLocation, String verbosity)
   at Microsoft.DotNet.ToolPackage.ToolPackageInstaller.InstallPackageToExternalManagedLocation(PackageLocation packageLocation, PackageId packageId, VersionRange versionRange, String targetFramework, String verbosity)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)

Tool 'dotnet-counters' (version '6.0.328102') was restored. Available commands: dotnet-counters
Tool 'dotnet-dump' (version '6.0.328102') was restored. Available commands: dotnet-dump
Tool 'dotnet-gcdump' (version '6.0.328102') was restored. Available commands: dotnet-gcdump
Tool 'dotnet-sos' (version '6.0.328102') was restored. Available commands: dotnet-sos
Tool 'dotnet-stack' (version '6.0.328102') was restored. Available commands: dotnet-stack
Tool 'dotnet-symbol' (version '1.0.335501') was restored. Available commands: dotnet-symbol
Tool 'dotnet-trace' (version '6.0.328102') was restored. Available commands: dotnet-trac

Would it be possible to run the dotnet tool install command by passing --verbosity detailed option so that we can get some additional information about the reason for the error. Passing --verbosity detailed option on CI will write too much information into the logs but it would be helpful to reproduce or understand the root cause of the error.

@nkolev92 nkolev92 added the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Oct 17, 2022
@ghost ghost added the Status:No recent activity No recent activity. label Nov 1, 2022
@ghost
Copy link

ghost commented Nov 1, 2022

This issue has been automatically marked as stale because we have not received a response in 14 days. It will be closed if no further activity occurs within another 14 days of this comment.

@ghost ghost closed this as completed Nov 16, 2022
@ghost ghost added Resolution:NeedMoreInfo This issue appears to not have enough info to take action and removed Status:No recent activity No recent activity. labels Nov 16, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Restore Product:dotnet.exe Resolution:NeedMoreInfo This issue appears to not have enough info to take action Type:Bug WaitingForCustomer Applied when a NuGet triage person needs more info from the OP
Projects
None yet
Development

No branches or pull requests

2 participants