我怎样才能 select 特定的 PCL 配置文件 (Xamarin.Forms)

How can I select a specific PCL profile (Xamarin.Forms)

我需要使用特定的便携式 class 库配置文件 (111),默认值为 259。我查看了 PCL 属性的库部分,但 259 和 111 似乎选择相同的受支持平台,因此我似乎无法使用它在它们之间进行更改。我需要 111,因为 "brutile" 我需要使用的 nuget 包需要安装它。确切的错误输出是

"Error Could not install package 'BruTile 0.21.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework."

另外这是配置文件259和111都支持的支持平台的屏幕截图。 *注意:使用 visual studio 2017

配置文件111和259最大的区别是259支持silverlight项目。我怀疑您没有安装 silverlight sdk 或 windows 8.1 sdk,因此您无法取消选中它们。

一种选择是备份您的 csproj 文件并对其进行编辑。搜索 Profile259 并将其更改为 Profile111。然后重新加载您的项目。 (备份是为了防止出现问题,之后您无法打开项目)。我想你之后就可以使用 Nuget 包了