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

list package error when use --include-transitive and --highest-minor option #14068

Open
Genuineh opened this issue Jan 26, 2025 · 2 comments
Open

Comments

@Genuineh
Copy link

NuGet Product Used

dotnet.exe

Product Version

9.0.101

Worked before?

No response

Impact

It's more difficult to complete my work

Repro Steps & Context

1.create a new package A
2.exec cmd like dotnet list package --outdated --highest-minor --include-transitive in sln that use A package

Verbose Logs

OK https://api.nuget.org/v3/registration5-gz-semver2/ziggycreatures.fusioncache/index.json 204ms
  OK https://api.nuget.org/v3/registration5-gz-semver2/ziggycreatures.fusioncache.backplane.stackexchangeredis/index.json 201ms
  OK https://api.nuget.org/v3/registration5-gz-semver2/ziggycreatures.fusioncache.backplane.memory/index.json 205ms
  OK https://api.nuget.org/v3/registration5-gz-semver2/ziggycreatures.fusioncache.serialization.neueccmessagepack/index.json 210ms
  OK https://api.nuget.org/v3/registration5-gz-semver2/zlib.net-mutliplatform/index.json 216ms
  OK https://api.nuget.org/v3/registration5-gz-semver2/zstdnet/index.json 211ms
  OK https://api.nuget.org/v3/registration5-gz-semver2/zstdsharp.port/index.json 225ms
error: Sequence contains no matching element
trace: System.AggregateException: One or more errors occurred. (Sequence contains no matching element)
trace:  ---> System.InvalidOperationException: Sequence contains no matching element
trace:    at System.Linq.ThrowHelper.ThrowNoMatchException()
trace:    at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
trace:    at NuGet.CommandLine.XPlat.ListPackageCommandRunner.UpdatePackagesWithSourceMetadata(List`1 frameworks, Dictionary`2 packageMetadata, Li
stPackageArgs listPackageArgs)
trace:    at NuGet.CommandLine.XPlat.ListPackageCommandRunner.GetProjectMetadataAsync(String projectPath, ListPackageReportModel listPackageReport
Model, MSBuildAPIUtility msBuild, ListPackageArgs listPackageArgs)
trace:    at NuGet.CommandLine.XPlat.ListPackageCommandRunner.GetReportDataAsync(ListPackageArgs listPackageArgs)
trace:    at NuGet.CommandLine.XPlat.ListPackageCommandRunner.ExecuteCommandAsync(ListPackageArgs listPackageArgs)
trace:    at NuGet.CommandLine.XPlat.ListPackageCommand.<>c__DisplayClass0_1.<<Register>b__1>d.MoveNext()
trace:    --- End of inner exception stack trace ---
trace:    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
trace:    at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
trace:    at NuGet.CommandLine.XPlat.Program.MainInternal(String[] args, CommandOutputLogger log)
@Genuineh
Copy link
Author

It's uncertain whether more complex dependencies are required to stably reproduce this issue, but this seems to be an exception caused by the unsuccessful processing of certain data.

@Genuineh
Copy link
Author

exec successful after remove highest-minor option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants