dotnet / dotnet/project-system
There is no way to query PackageReferences in a project
Open
Area-External-CPS
Parity-Legacy-API
Triage-Approved
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
There are API's to Add or Remove a PackageReference, but there is currently no way to ask if a package reference exists in a project, and if so, what version is it. There's also no way to just enumerate all existing package references.
So you can't positively know if a package is referenced in a project until you have **successfully** restored packages in a project, at which time existing NuGet related package services will have *installed* version information and let you enumerate *installed* packages.
Contributor guide
Assessment
This issue has not been assessed yet.