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

Enhance dotnet list package to support Packages.Config #2892

Closed
wants to merge 13 commits into from

Conversation

rrelyea
Copy link
Contributor

@rrelyea rrelyea commented Jun 17, 2019

See evolving details at bottom of this comment in the fix section.

Bug

Fixes: NuGet/Home#8209
Regression: No

Testing/Validation

Tests Added: Yes/No
Reason for not adding tests:
Validation:

so far:

  • ran on nerdbank.streams repo
  • ran on nuget.sln repo
  • ran on c++ heavy repos (react-native-windows)

Fix

Enable new capabilities in dotnet list package

  • changed order of project output to be full path based

  • changed "project name" from "projectName" to "src\nuget.client\nuget.foo"

  • handles packages.config projects

if listing a solution, we can see solution package folder, and find out dependency info...and show likely transitive packages.

warns if outputing PC w/o solution.

  • won't error out when it hits project that "dotnet msbuild" cannot load due to targets/props not found, etc...

  • will fallback to looking to obj\project.assets.json if project cannot load

  • handles website projects -- good idea?

DataModel - Renamed internal classes:

FrameworkPackages -> TargetFrameworkInfo
InstalledPackageReference -> PackageReferenceInfo
DataModel - new ProjectInfo type
New utilities (or potential ones):
PackagesFolderPathUtility.cs - Gets Solution Packages folder. improve name?
GetPackagesConfigFile.cs (in ListPackageCommandRunner.cs now...Move)
GetDependencyInfoFromPackagesFolderAsync

need to rework to be general purpose helper method, if reasonable

  • RetreivePackageVersionsForPossibleUpdates

Misc mentions:

  • ListPackageArgs.cs - passing settings in so that...
  • PackageReferenceInfo.cs -
    todo: PrefixString - should this be in the Model???
    todo: IsFirstItem - should this be in the Model???
  • TargetFrameworkInfo.cs -
    todo: AssetsFileOnly should probably be in ProjectInfo
    todo: contains* feels funny. evaluate.
  • MSBuildAPIUtility.cs -
    ok to have catchall exception?
  • ProjectPackgesPrintUtility.cs & TableParser.cs
    todo: review thoroughly
  • ListPackageCommandRunner.cs
    no longer requires all projects to have matching files.
    (needed for website projects)
    collects all "packageVersions" for outdated and perhaps "--by-package" setting. TODO: review and improve when we do this.
    todo: StorePackageUpdateInformationInTargetFrameworkInfo - consider moving to TargetFrameworkInfo class
    todo: dig into UpdateLevel purpose...have ignored until now.

@rrelyea rrelyea force-pushed the dev-rrelyea-listpackageforpc branch from dade888 to 56b94be Compare June 18, 2019 22:41
@nkolev92
Copy link
Member

copy-pasted-message:
Can we maybe close this until it gets picked up again and it's ready for review? :)

@nkolev92
Copy link
Member

Closing per https://github.com/NuGet/NuGet.Client/blob/dev/docs/workflow.md#draft-pull-requests.

Nothing is lost by this closure, even if the branch is deleted eventually because GH will keep the reference.

@nkolev92 nkolev92 closed this Apr 28, 2020
@nkolev92 nkolev92 deleted the dev-rrelyea-listpackageforpc branch September 24, 2020 01:34
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 list package supports showing package dependencies declared in packages.config
2 participants