I want to use Nhibernate and I write a this code package console manager

Install-Package NHibernate

and I get this error

Install-Package : Unable to resolve dependency 'Iesi.Collections (≥ 3.2.0.4000)'. At line:1 char:16 + Install-Package <<<< NHibernate + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

and then I want to install Iesi.Collections and i try this code

PM> Install-Package Iesi.Collections -Version 3.2.0.4000
Install-Package : Unable to find package 'Iesi.Collections'.
At line:1 char:16
+ Install-Package <<<<  Iesi.Collections -Version 3.2.0.4000
+ CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Have any idea to solve this problem? :S

有帮助吗?

解决方案

I had exactly this problem this morning.

I'm guessing it was because different projects in my solution referenced different version of the same assemblies which made Nuget freak out.

I got it working after doing this:

  1. Uninstall everything that depends on Iesi.Collections like Nhibernate, FluentNHibernate etc by running Uninstall-Package <name>.
  2. Uninstall Iesi.Collections (Uninstall-Package Iesi.Collections)
  3. (Verify that there isn't any references to different versions of the same assemblies, look in the packages-folder for multiple folders with different version number)
  4. Add your nuget packages again

If you, like me, got quit a few packages and don't remember all of them on top of your head, Run Get-Package and copy output to notepad before you remove anything and you can simply add everything again in a minute.

(Edit: I'm running this version of Nuget http://nuget.codeplex.com/downloads/get/382255 after following some link in this page)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top