3

I have a solution that looks like this:

 -> Proj A
 -> proj B

Proj B references Proj A

Both projects have a paket.template that looks like this:

When I paket pack, I get two nugets created, one for each project. Fantastic.

However, I now want to make ProjA.dll be bundled inside ProjB's nuget (ProjB is an .exe/tool that needs its dependencies bundled to operate).

Adding include-referenced-projects true to ProjBs paket.template has no effect, neither does any combination of paket command line --include-referenced-projects true that I've tried.

Is this supported? Is this a bug?

Either way, how can I achieve what I want, without making separate solutions to house ProjA and ProjB?

halfer
  • 19,824
  • 17
  • 99
  • 186
Andrew Bullock
  • 36,616
  • 34
  • 155
  • 231

1 Answers1

0

If you look at ProjB.nuspec from resulting nuget package you see nuget reference to ProjA package. So resulting ProjB package has all needed dependencies.

You can achive what you want by several ways:

  1. Pack ProjB by command paket pack <output> --template <path to ProjB paket.tempplate> (without --include-referenced-projects flag). Pack ProjA by separate command if you need it.

  2. Delete paket.template from ProjA, then pack ProjB with --include-referenced-projects flag. But in this case package for ProjA will not be created.

  3. Change paket.template type for ProjB from "project" to "file" and specify all dependencies and files manually.

  4. (HACK:)) you can rename paket.template for ProjA from paket.template to <somethingElse>.template and pack ProjB with --include-referenced-projects flag. Paket will not find than ProjA produce nuget package and add it as binary dependency to ProjB. You still can pack ProjA with separate command paket pack --template "path to <somethingElse>.template"

lexarchik
  • 1
  • 2
  • 3