3

The paket.dependencies page of the Paket documentation describes the purpose of the framework restriction field framework very briefly, and I still don't understand what it does.

Apparently, the specified frameworks will cause Paket to download and reference only those packages/libraries/APIs -- I'm not sure of the right terminology -- which fall within at least one of the named frameworks.

So what is the point of the TargetFramework fields of the projects, then? I had thought that that's what they were supposed to do. How does Paket's framework specification interact with the solution's projects' TargetFramework specifications?

CarbonFlambe
  • 366
  • 1
  • 12
  • I think it only says "download", not "reference"? A single NuGet package may include multiple binaries, for different targets. These are all downloaded together, and (when using NuGet/`dotnet`) are all stored next to each other on disk, regardless of which ones are actually referenced. I think this is telling Paket not to bother extracting and storing any binaries which aren't for your selected targets. Also see `framework: auto-detect ` in the section below -- you can tell Paket "only bother downloading and storing the binaries which my project is going to reference" – canton7 Jun 01 '20 at 13:28
  • @canton7 Oh I see, thanks. So it just limits what is downloaded to your `~/.nuget/packages` directory? But why would you want a per-solution specification for that? Shouldn't it be a global Paket configuration setting? Yes, that `framework: auto-detect` makes more sense to me. – CarbonFlambe Jun 01 '20 at 13:38
  • I don't know: I don't use Paket. I'm combining my reading of that doc with my knowledge of NuGet. [This doc](https://fsprojects.github.io/Paket/paket-folder.html) says that Paket downloads stuff to a `.paket` directory in the root of your repository, so it's not user-wide. My guess is that the auto-detection is relatively recent (with SDK-style csprojs perhaps?) and/or fails in some circumstances. Which frameworks your project targets definitely isn't a global setting: that's a per-project setting. – canton7 Jun 01 '20 at 13:45

0 Answers0