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

'dotnet nuget why' works for directory inputs for the 'Path' argument #5846

Merged
merged 14 commits into from
Jun 18, 2024

Conversation

advay26
Copy link
Member

@advay26 advay26 commented Jun 9, 2024

Bug

Fixes: NuGet/Home#13527

Regression? Last working version:

Description

dotnet nuget why only worked when a solution or project file was provided for the 'Path' argument. It should also work for directory inputs.

This PR includes:

  • Enabling directory inputs
    • Search for a solution file or project file in the given directory. Return an error if there were multiple solution or project files in the directory, or if there were zero solution or project files (same behavior as commands like dotnet list package and dotnet add package). See the GetListOfProjectsFromPathArgument() method in MSBuildAPIUtility.cs.
  • Unit tests and an integration test for the change
  • New test logger that I needed for unit testing

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@advay26 advay26 marked this pull request as ready for review June 10, 2024 18:51
@advay26 advay26 requested a review from a team as a code owner June 10, 2024 18:51
@advay26 advay26 requested a review from zivkan June 11, 2024 22:33
@advay26 advay26 force-pushed the dev-advay26-dotnet-nuget-why-directory branch from 26762df to 9274972 Compare June 14, 2024 03:55
Copy link
Contributor

@jebriede jebriede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Left a few suggestions.

@advay26 advay26 merged commit e65445e into dev Jun 18, 2024
28 checks passed
@advay26 advay26 deleted the dev-advay26-dotnet-nuget-why-directory branch June 18, 2024 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'dotnet nuget why' does not work when a directory is provided for the 'Path' argument
3 participants