2015-01-09 45 views
2

我已经创建了一个新的Protable Class Library项目。我希望它具有一些IO功能,因此我决定使用PCLStorage无法使用nuget安装PCLStorage

所以在程序包管理器中,我执行以下命令:Install-Package PCLStorage但它无法安装程序包。我提示以下错误:

Could not install package 'PCLStorage 1.0.1'. You are trying to install this package into a project that targets 'portable-net40+sl50+wp80+win', but the package does not contain any assembly references or content files that are compatible with that framework.

任何指针,以帮助我吗?


完全错误:

Install-Package : Could not install package 'PCLStorage 1.0.1'. You are trying to install this package into a project that targets 'portable-net40+sl50+wp80+win', but the package does 
not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 
At line:1 char:1 
+ Install-Package PCLStorage -Version 1.0.1 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : NotSpecified: (:) [Install-Package], InvalidOperationException 
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand 

回答

3

nuspec file表明,以下移植库框架的支持:

portable-net45+wp8+wpa81+win8+monoandroid+monotouch+Xamarin.iOS+Xamarin.Mac 

你应该尝试升级.NET 4.0〜4.5,从您的PCL删除的Silverlight,如他们显然不支持这个框架。

+0

工程!非常感谢 – Krimson

+0

@Krimson太棒了!我很高兴我能提供帮助。 – Frank