7
为什么Paket默认安装的方式比Nuget更多?这是正常行为还是我做错了什么?为什么Paket比Nuget安装更多的软件包?
我跟着Getting Started guide(但我通过choco install paket.powershell
安装的paket.powershell
帮助):
- 我做了一个新的WPF项目
- 初始化
Paket
与Paket-Init
命令 - 新增
nuget reactiveui
到paket.dependencies
文件 - 执行
Paket-Install
命令下载软件包
结果在我的packages
文件夹中我有以下几点:
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
当使用标准的NuGet基于从VS包管理器控制台Install-Package reactiveui
,我有:
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
1的结果是非常分心所有这些依赖关系。或者它应该是怎样的?我觉得我错过了一些附加的限制/约束参数...
我认为这发生在你没有指定框架时。将“nuget reactiveui”更改为“nuget reacui framework:net45”。 – Foole
这在[paket常见问题解答](https://fsprojects.github.io/Paket/faq.html#Does-Paket-run-install-ps1-scripts)中解决:“为什么Paket会添加对库的引用与我的项目中的NuGet包中的每个受支持的框架版本相关联?“本质上,试图让您轻松切换框架而不会出现奇怪的错误消息。然而,这意味着下载大量你可能不需要的东西。一般来说,你不需要查看软件包文件夹,即使使用NuGet,它也会变得有点麻烦,因为NuGet从不清理它。 –
谢谢,您的意见帮助了我。我修改了'paket.dependencies'和'nuget reactiveui framework:net45',reran'Paket-Install',现在依赖关系的数量和nuget一样。那些其他软件包被垃圾收集/删除。 – Bad