我正在使用Visual Studio for mac。 我试图在nuget上下载SocketIoClientDotNet。 但我没能安装包。
[我的规格] 适用于Mac的Visual Studio社区2017 版本7.1(build 1297) 运行: 单声道5.2.0.215(d15-3 / da80840)(64位) GTK + 2.24.23(罗利主题)
包装版本:502000215
的NuGet 버전:4.3.0.2418
.NET Core 运行时:未安装 SDK:未安装 MSBuild SDKs:/ Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks
Xamarin.Profiler 1.5.5 / Applications / Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Apple Developer Tools Xcode 8.3.3(12175.1) 构建8E3004b
Xamarin.Mac 版本:3.6.0.19(Visual Studio社区)
Attempting to gather dependency information for package 'SocketIoClientDotNet.0.9.13' with respect to project 'Chat', targeting '.NETPortable,Version=v4.5,Profile=Profile111'
GET https://api.nuget.org/v3/registration3-gz-semver2/socketioclientdotnet/index.json
OK https://api.nuget.org/v3/registration3-gz-semver2/socketioclientdotnet/index.json 1290ms
Total number of results gathered : 2
Gathering dependency information took 1.3 sec
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json - 1.3 sec
Attempting to resolve dependencies for package 'SocketIoClientDotNet.0.9.13' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'SocketIoClientDotNet.0.9.13'
Resolved actions to install package 'SocketIoClientDotNet.0.9.13'
Retrieving package 'SocketIoClientDotNet 0.9.13' from 'nuget.org'.
For adding package 'SocketIoClientDotNet.0.9.13' to project 'Chat' that targets 'portable45-net45+win8+wpa81'.
Install failed. Rolling back...
Package 'SocketIoClientDotNet.0.9.13' does not exist in project 'Chat'
Package 'SocketIoClientDotNet.0.9.13' does not exist in folder '/Users/LSH/Work/Dev/WebServer/Chat/packages'
Executing nuget actions took 139.18 ms
Could not install package 'SocketIoClientDotNet 0.9.13'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', 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.
答案 0 :(得分:2)
SocketIoClientDotNet 0.9.13 NuGet包有两个可移植的程序集:
lib/portable-win81+wpa81
lib/portable-wpa81+wp81
这些不会映射到任何已知的可移植类库(PCL)配置文件,因此NuGet将不允许您将其安装到可移植类库项目中。
最新的SocketIoClientDotNet beta版本1.0.2-beta1没有PCL程序集。相反,它有一个.NET Standard 1.3程序集。不幸的是,你不能在PCL项目中使用它。
因此,要么找到另一个提供所需内容的NuGet包,并且还支持PCL项目,否则您必须将项目修改为至少以.NET Standard 1.3为目标的.NET Standard项目。