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

add PC support to dotnet list package #2883

Closed
wants to merge 5 commits into from

Conversation

rrelyea
Copy link
Contributor

@rrelyea rrelyea commented Jun 12, 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 closed this Jun 17, 2019
@rrelyea rrelyea deleted the dev-rrelyea-ListPackageForPC branch June 17, 2019 19:46
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
1 participant