我尝试过在ServiceStack框架 4.0和.Net 4.5应用程序上安装.Net。我两次都犯了同样的错误:
Install failed. Rolling back...
Install-Package : Could not install package 'ServiceStack.Interfaces 4.0.31'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any
assembly references that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Servicestack
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand和
Install failed. Rolling back...
Install-Package : Could not install package 'ServiceStack.Interfaces 4.0.31'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any
assembly references that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Servicestack
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand怎么回事?
发布于 2014-09-04 22:41:14
ServiceStack.Interfaces发生的主要变化是,它现在是一个支持最受支持的平台(Profile136)的可移植库( v4.0.30 ):
如果NuGet报告说它无法为受支持的平台找到必要的程序集引用,那么很可能您使用的是不包含PCL支持的旧版本的NuGet,这可以由升级到最新的NuGet解决。
发布于 2017-04-20 16:06:01
“升级Nuget”选项不适用于我。事实证明,ServiceStack的版本确实有.NET限制。我们的应用程序是.NET 4.0,所以ServiceStack.Interfaces 4.062是我们可以安装的最高版本。
https://stackoverflow.com/questions/25654219
复制相似问题