我刚刚尝试将 Iesi.Collections 添加到 .NET 2.0 项目中,但失败了:-
PM> Install-Package Iesi.Collections
Successfully installed 'Iesi.Collections 3.2.0.4000'.
Successfully uninstalled 'Iesi.Collections 3.2.0.4000'.
Install failed. Rolling back...
Install-Package : Could not install package 'Iesi.Collections 3.2.0.4000'. You are trying to install this package into a project that target
s '.NETFramework,Version=v2.0', but the package does not contain any assembly references that are compatible with that framework. For more i
nformation, contact the package author.
At line:1 char:16
+ Install-Package <<<< Iesi.Collections
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
嗯,嗯???
我认为 Iesi.Collections 的整个想法是获得对存在于 .NET 3.5+++ 中但不存在于 .NET 2.0 中的集合的支持。所以这个包是为 .NET 2.0 项目制作的?哇??
更新
我必须以 .NET 2.0 项目为目标,因此无法更新到 3.5 项目。(如果我这样做了,我就不需要使用这个包......)