NuGet/Home

Machine readable output for 'why' command

Open

#13,649 创建于 2024年7月24日

在 GitHub 查看
 (1 评论) (2 反应) (1 负责人)HTML (1,459 star) (292 fork)batch import
Functionality:WhyPriority:2Product:dotnet.exeType:Featurehelp wanted

描述

NuGet Product(s) Affected

dotnet.exe

Current Behavior

The output of the dotnet nuget why command is easily readable for humans but not for machines.

Desired Behavior

Have an optional switch that allows the output to be machine readable from the console output.

Ideas for the output format: json or plain with a delimiter. json

{
  "net472": { },
  "net6.0": [
    {
      "name": "Azure.Core",
      "version": "1.38.0",
      "packages": [
        {
          "name": "System.Text.Json",
          "version": "8.0.3"
        },
        {
          "name": "System.Memory.Data",
          "version": "1.0.2",
          "packages": [
            {
              "name": "System.Text.Json",
              "version": "8.0.3"
            }
          ]
        }
      ]
    }
  ]
}

plain

net472/
net6.0/System.Text.Json:8.0.3
net6.0/Azure.Core:1.38.0/System.Text.Json:8.0.3
net6.0/Azure.Core:1.38.0/System.Memory.Data:1.0.2/System.Text.Json:8.0.3

Additional Context

Following up on issue #13639.

We want to use the results of the dotnet nuget why command in automated reports for our developers. We therefore desire to use the data of the why command programmatically and make several processes easier.

贡献者指南