Reputation: 6027
I have tried installing the ServiceStack Framework on both .Net 4.0 and .Net 4.5 applications. I have gotten the same error both times:
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
and
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
What gives?
Upvotes: 2
Views: 1264
Reputation: 4852
The "upgrade Nuget" option was not working for me. Turns out that versions of ServiceStack do have .NET limits. Our application is .NET 4.0, so ServiceStack.Interfaces 4.062 was the highest version we could install.
Upvotes: 1
Reputation: 143319
The major change to happen to ServiceStack.Interfaces
is that it's now a portable library as of v4.0.30 supporting most supported platforms (Profile136):
If NuGet is reporting that it can't find the necessary assembly references for a supported platform than it's likely that you're using an older version of NuGet that doesn't include PCL support, which can be resolved by upgrading to the latest NuGet.
Upvotes: 2