2

I'm developing a library for F#. It contains 3 projects, each of which are delivered in different packages (One is a core requirement for consumers, the others are optional). It looks like this:

src/
  - ConsoleWriter/
    - ConsoleWriter.fsproj
  - FileWriter/
    - FileWriter.fsproj
  - Forest
    - Forest.fsproj

So, Forest is standalone, which is fine. ConsoleWriter and FileWriter both depend on Forest. In the fsproj for the writers, I have

<ItemGroup>
  <ProjectReference Include="..\Forest\Forest.fsproj" />
</ItemGroup>

so that I can reference the most up to date Forest during development. However, I think I then need to add the dependency to the package on nuget when creating the new ConsoleWriter package. Is there a way to do this with paket?

I don't want to always depend on the remote version, because it becomes problematic if I'm updating more than one at the same time.

Edit: I've just seen this on the paket.template docs

In a project file, the following dependencies will be added:

  • ...

  • Any project reference with a matching paket.template file with a minimum version requirement of the version currently being packaged.

(emphasis mine). Does that imply that it already does exactly what I'm asking for?

Edit 2: Just done a test with paket generate-nuspec and it does not contain the Forest dependency.

Community
  • 1
  • 1
David
  • 1,326
  • 9
  • 16

1 Answers1

0

You could add the remote version as a regular dependency, then use a paket.local file to override it with your locally-edited version during development.

The example use case on the linked page looks like the same thing you're trying to do, if I have understood you correctly.

piaste
  • 2,038
  • 11
  • 20