add PC support to dotnet list package #2883
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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
Misc mentions:
todo: PrefixString - should this be in the Model???
todo: IsFirstItem - should this be in the Model???
todo: AssetsFileOnly should probably be in ProjectInfo
todo: contains* feels funny. evaluate.
ok to have catchall exception?
todo: review thoroughly
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.