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 · 4 comments
Open
Labels
Functionality:ListPackage dotnet.exe list package Product:dotnet.exe Type:Bug WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually.

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

@jeffkl
Copy link
Contributor

jeffkl commented Feb 10, 2025

@Genuineh I was not able to reproduce the issue, can you provide a project or list of package references that causes this error to happen?

@jeffkl jeffkl added the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Feb 10, 2025
@Genuineh
Copy link
Author

packagetest.tar.gz
@jeffk I work in archlinux

dotnet --info

.NET SDK:
 Version:           9.0.101
 Commit:            eedb237549
 Workload version:  9.0.100-manifests.3068a692
 MSBuild version:   17.12.12+1cce77968

Runtime Environment:
 OS Name:     arch
 OS Version:  
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.0
  Architecture: x64
  Commit:       9d5a6a9aa4

.NET SDKs installed:
  7.0.405 
  8.0.203
  9.0.101

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.15 
  Microsoft.AspNetCore.App 8.0.3
  Microsoft.AspNetCore.App 9.0.0
  Microsoft.NETCore.App 7.0.15
  Microsoft.NETCore.App 8.0.3
  Microsoft.NETCore.App 9.0.0 

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

error when dotnet list package --outdated --highest-minor --include-transitive -v d

  NotFound https://nuget.lan.wiqun.com/repository/nuget-hosted/v3/registration/zlib.net-mutliplatform/index.json 9ms
  NotFound https://nuget.lan.wiqun.com/repository/nuget-hosted/v3/registration/zstdnet/index.json 9ms
  NotFound https://nuget.lan.wiqun.com/repository/nuget-hosted/v3/registration/zstdsharp.port/index.json 10ms
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, ListPackageArgs listPacka
geArgs)
trace:    at NuGet.CommandLine.XPlat.ListPackageCommandRunner.GetProjectMetadataAsync(String projectPath, ListPackageReportModel listPackageReportModel, MSBuildAPIUtilit
y 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)

@microsoft-github-policy-service microsoft-github-policy-service bot added WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually. and removed WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:ListPackage dotnet.exe list package Product:dotnet.exe Type:Bug WaitingForClientTeam Customer replied, needs attention from client team. Do not apply this label manually.
Projects
None yet
Development

No branches or pull requests

3 participants