Skip to content

dotnet nuget why does not give an error if only a project path was specified #14030

Closed
NuGet/NuGet.Client
#6218

Description

@jeffkl

NuGet Product Used

dotnet.exe

Product Version

9.0.2xx

Worked before?

No response

Impact

None

Repro Steps & Context

If you run dotnet nuget why and specify just a project path, the command assumes that the argument is a package name and then looks in the current directory for a project which leads to the wrong errors being logged. Instead, our command-line argument parser could call File.Exists() on the single argument to see if the user specified a path and then correctly log the fact that the user failed to specify a package.

We've had to disable Dotnet.Integration.Test.DotnetWhyTests.WhyCommand_EmptyPackageArgument_Fails() for now until this is fixed.

Verbose Logs

D:\nuget3\.test\work\2b6fe9ec\52de6c5f\solution\Test.Project.DotnetNugetWhy>dotnet nuget why D:\nuget3\src\NuGet.Core\NuGet.Build.Tasks.Console\NuGet.Build.Tasks.Console.csproj
Project 'Test.Project.DotnetNugetWhy' does not have a dependency on 'D:\nuget3\src\NuGet.Core\NuGet.Build.Tasks.Console\NuGet.Build.Tasks.Console.csproj'.

Activity

  1. nkolev92 commented on Jan 9, 2025

    @nkolev92
    Member

    I'm guessing this is a P1 since it's in 9.0.2xx?
    It'd be a regression we need to fix immediately?

  2. added
    RegressionFromPreviousRTM
    on Jan 9, 2025
  3. nkolev92 commented on Jan 9, 2025

    @nkolev92
    Member
  4. added
    Priority:1
    Priority:2
    and removed
    Priority:1
    on Jan 9, 2025
  5. nkolev92 commented on Jan 10, 2025

    @nkolev92
    Member

    Assigning since @zivkan did the work already: NuGet/NuGet.Client#6218

  6. added this to the 6.14 milestone on May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Functionality:WhyPriority:2Product:dotnet.exeRegressionFromPreviousRTMType:Bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions