Iesi.Collections not loading?
-
18-06-2021 - |
Frage
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
Lösung
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:
- Uninstall everything that depends on
Iesi.Collections
likeNhibernate
,FluentNHibernate
etc by runningUninstall-Package <name>
. - Uninstall Iesi.Collections (
Uninstall-Package Iesi.Collections
) - (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)
- 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)