0

On a linux machine, given a package.config file, I would like to output a JSON of the dependencies tree from that file.

As packages within the package.config might not be compatible with the Linux machine, I'm guessing that a solution that involves installing the packages first won't work.

Thanks

MichaelLo
  • 1,289
  • 1
  • 14
  • 26
  • You tagged the question with both Mono and .Net Core, which one are you asking about? I'm guessing it's Mono, since .Net Core does not use packages.config. – svick Apr 08 '17 at 22:45
  • It doesn't really matter for me which one to use; I want to be able to receive a json and provide it's dependencies on a linux machine. The packages within the json might not even be supported in the linux machine. – MichaelLo Apr 09 '17 at 05:21
  • https://stackoverflow.com/a/47838073/5598194 Here is my answer to the similar question referred by Carl. Is uses NPM so it could work on Linux. But as .NET Core doesn't use packages.config, and I don't know how Mono stores information about packages, I don't post this solution as an answer here. At least until you say it is helpful :) – N. Kudryavtsev Dec 16 '17 at 13:43

1 Answers1

0

Please take a look at View nuget package dependency hierarchy. The answer over there contains a piece of code you can adopt to your needs. Unfortunately the Nuget.Core package is not compatible with .NET Core so you will need to target the full .NET framework which implies this tool can only run on a Windows OS machine.

Community
  • 1
  • 1
Carl in 't Veld
  • 1,363
  • 2
  • 14
  • 29