PackageReference as a package management format only works on a per project basis.
So you would need to "analyze" each project individually.
From the commandline, there "will" be a way to list all the packages.
It's the "dotnet list package" command.
I say will, because it's still in preview.
You can download the 2.2.100 version from here.
Related spec.
The simplest usage example is:
dotnet list YourSln.sln package
If you do not want to use a dotnet.exe preview, you can consider writing your own tool, by reading the assets files for each project, which is what the actual command does.
For reference, see code here and here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…