10

Why Paket installs way more packages than Nuget by default? Is it normal behaviour or am I doing something wrong?

I followed Getting Started guide (but with the help of paket.powershell which I installed by choco install paket.powershell):

  • I made a new WPF project
  • Initialized Paket with Paket-Init command
  • Added nuget reactiveui to paket.dependencies file
  • Executed Paket-Install command to download packages

As a result I have the following in my packages folder:

reactiveui
reactiveui-core
Rx-Core
Rx-Interfaces
Rx-Linq
Rx-Main
Rx-PlatformServices
Rx-WindowStoreApps
Rx-WinRT
Rx-Xaml
Splat
System.Collections
System.Diagnostics.Debug
System.Diagnostics.Tools
System.IO
System.Linq
System.Linq.Expressions
System.ObjectModel
System.Reflection
System.Reflection.Extensions
System.Runtime
System.Runtime.Extensions
System.Runtime.InteropServices.WindowsRuntime
System.Runtime.Serialization.Primitives
System.Runtime.Serialization.Xml
System.Text.Encoding
System.Threading
System.Threading.Tasks

When using standard nuget-based Install-Package reactiveui from VS Package Manager Console, I have:

reactiveui-core.7.0.0
reactiveui.7.0.0
Rx-Core.2.2.5
Rx-Interfaces.2.2.5
Rx-Linq.2.2.5
Rx-Main.2.2.5
Rx-PlatformServices.2.2.5
Rx-XAML.2.2.5
Splat.1.6.0

1st outcome is very distracting with all those dependencies. Or is it how it is supposed to be? I feel I miss some additional restricting / confining parameters...

Bad
  • 4,967
  • 4
  • 34
  • 50
  • 7
    This is addressed in the [paket FAQ](https://fsprojects.github.io/Paket/faq.html#Does-Paket-run-install-ps1-scripts) under: "Why does Paket add references to the libraries associated with each supported framework version within a NuGet package to my projects?" Essentially paket is trying to make it easy for you to switch frameworks without bizarre error messages. However that means downloading tons of stuff you might not need. Generally you don't need to look in the packages folder, and even with NuGet it gets somewhat messy as versions change since NuGet never cleans it up. – Mike Zboray Dec 17 '16 at 21:41
  • 2
    Thanks, your comments helped me. I modified `paket.dependencies` with `nuget reactiveui framework:net45`, reran `Paket-Install`, and the number of dependencies is now the same as with nuget. Those other packages were garbage collected / deleted. – Bad Dec 18 '16 at 15:45
  • The correct link to the FAQ section [Why does Paket add references to the libraries associated with each supported framework version within a NuGet package to my projects?](https://fsprojects.github.io/Paket/faq.html#Why-does-Paket-add-references-to-the-libraries-associated-with-each-supported-framework-version-within-a-NuGet-package-to-my-projects) – 8DH Nov 15 '18 at 07:38

1 Answers1

11

(Posting my comment as an answer)

This happens when you don't specify the framework.

Change "nuget reactiveui" to something like "nuget reactiveui framework: net45".

Foole
  • 4,754
  • 1
  • 26
  • 23
  • 2
    Link to the [Framework Restrictions](https://fsprojects.github.io/Paket/dependencies-file.html#Framework-restrictions) section. – 8DH Nov 15 '18 at 07:39