我正在尝试使用NuGet安装Spring.Testing.NUnit,并且它迫使我更新依赖项,即使我已经有一个可接受的版本。它甚至没有更新到最新版本,即2.6.0。
我可以使用-IgnoreDependencies
安装,但是当我这样做时,我错误地运行了错误Could not load file or assembly 'nunit.framework, Version=2.6.0.12051
的测试
Spring.Testing.NUnit包是错误的,它需要什么版本的NUnit?
PM> Install-Package NUnit -Version 2.5.7.10213
'NUnit 2.5.7.10213' already installed.
Successfully added 'NUnit 2.5.7.10213' to Services.Tests.Unit.
PM> Install-Package Spring.Testing.NUnit
Attempting to resolve dependency 'Common.Logging (= 1.2.0)'.
Attempting to resolve dependency 'NUnit (= 2.5.7)'.
Attempting to resolve dependency 'Spring.Core (= 1.3.2)'.
Attempting to resolve dependency 'Spring.Data (= 1.3.2)'.
Attempting to resolve dependency 'Spring.Aop (= 1.3.2)'.
Successfully installed 'NUnit 2.5.10.11092'.
Successfully installed 'Spring.Testing.NUnit 1.3.2'.
Successfully removed 'NUnit 2.5.7.10213' from Services.Tests.Unit.
Successfully added 'NUnit 2.5.10.11092' to Services.Tests.Unit.
Successfully added 'Spring.Testing.NUnit 1.3.2' to Services.Tests.Unit.
答案 0 :(得分:2)
Spring.Testing.Packages需要NUnit> = 2.5.7。 NuGet认为版本字符串的第三部分可以安全地更新(通常,它不是特定于此包)。在这种情况下,NuGet将选择最高版本,其版本至少为2.5.7且低于2.6。