Enable `dotnet nuget why` on non-SDK style projects
zivkan opened this issue · comments
NuGet Product(s) Involved
dotnet.exe
The Elevator Pitch
dotnet nuget why
currently requires you to point to a project file, but the .NET SDK can only evaluate SDK style projects. Many non-SDK style Visual Studio projects try to import MSBuild props/targets files that don't exist in the .NET SDK and therefore trying to read project properties (to find the assets file) fails.
dotnet nuget why
is particularly useful for investigating why a package with a known vulnerability is used by a project, so allowing the command to work for non-SDK style projects will help customers investigate known vulnerabilities.
dotnet nuget why
should either allow a project.assets.json
file to be passed as an argument instead of a project file.
We can instruct customers that they can find the assets file location using msbuild.exe path\to\project.csproj -getProperty:ProjectAssetsFile
Additional Context and Details
No response