0

When I package a dotnet 6 app as a tool that is, with the following project setting...

<PackAsTool>true</PackAsTool>

the list of dependencies is empty in the generated Nuspec (and so in the package)

I am not sure what the rationale for this is, but is there a way to force the package to list the referenced packages?

Sebastian Slutzky
  • 382
  • 1
  • 5
  • 22
  • Tools are expected to be self-contained, so that when the .NET runtime sees an assembly reference, it can load the dll from the same directory as the tool/exe. The runtime doesn't fundamentally know about NuGet, so if referenced assemblies were package dependencies, the runtime wouldn't know how to discover the correct directory for each dll. However, when you pack, it publishes the app to a directory, and then packs the publish directory, so by default it normally just works out of the box. – zivkan Mar 17 '23 at 06:12

1 Answers1

0

I'll accept zivkan's comment as an answer, assuming that what I wan't is not even feasible

Sebastian Slutzky
  • 382
  • 1
  • 5
  • 22