简体   繁体   English

Xamarin中不受支持的PCL配置文件

[英]Unsupported PCL Profile in Xamarin

I am working with the GoPro camera and trying to run a library made by r1pper. 我正在使用GoPro相机,并尝试运行r1pper制作的库。 The project is described as 项目被描述为

A lightweight c# library to access and control GoPro HERO Action cameras It has a functional media browser based on Ambarella and GoPro App, it has also the full control of the camera, and live preview. 轻巧的c#库,用于访问和控制GoPro HERO Action摄像机。它具有基于Ambarella和GoPro App的功能媒体浏览器,还具有对摄像机的完全控制和实时预览。

I am having trouble when trying to compile on the Xamarin IDE: 尝试在Xamarin IDE上编译时遇到麻烦:

/Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/4.5/Microsoft.Common.targets: Error: /Library/Frameworks/Mono.framework/Versions/3.10.0/lib/mono/4.5/Microsoft.Common.targets:错误:

Unsupported PCL Profile '.NETPortable,Version=v4.0,Profile=Profile96'. 不支持的PCL配置文件'.NETPortable,Version = v4.0,Profile = Profile96'。 (GoPro.Hero) (GoPro.Hero)

I have looked at a couple of forums and blogs that mention there is no fix for this bug: 我看过几个论坛和博客,提到没有针对此错误的修复程序:

Is there really no workaround to this bug? 这个错误真的没有解决方法吗? Or am I misunderstanding something? 还是我误会了什么?

It looks like Profile 96 is not available in Mono. 看来Profile 96在Mono中不可用。

I would change the Portable Class Library (PCL) project so it targets a different profile that is available on Mono. 我将更改可移植类库(PCL)项目,以使其针对Mono上可用的其他配置文件。 I would pick Profile 78 or Profile 259 since these are the ones generally recommended by Xamarin. 我会选择Profile 78或259,因为这些是Xamarin通常推荐的。 You can do this in the Project Options under Build - General. 您可以在“构建-常规”下的“项目选项”中执行此操作。

You may need to reinstall/retarget the NuGet packages after changing the project's PCL profile. 更改项目的PCL配置文件后,您可能需要重新安装/重新定位NuGet软件包。 If you are using a recent version of Xamarin Studio then it should tell you if this is the case in the Package Console window. 如果您使用的是Xamarin Studio的最新版本,则应该在Package Console窗口中告诉您是否是这种情况。

If I'm not mistaken you didn't install Visual Studio 2012/2013 (which Automatically configure MSBuild for PCL usage), in this case you should install and configure PCL on your system manually (it is only needed for development, not for distribution) 如果我没记错的话,您没有安装Visual Studio 2012/2013(它会自动配置MSBuild以使用PCL),在这种情况下,您应该在系统上手动安装和配置PCL(仅用于开发,而不用于分发) )

Here are the steps based on this Guide 以下是基于本指南的步骤

1- Install .NET Framework 4.5.1 1-安装.NET Framework 4.5.1

2- Install Mono MDK 2-安装Mono MDK

3- Install PCL Library Tools : it will install MSBuild tools and Profile96 3-安装PCL库工具 :它将安装MSBuild工具和Profile96

4-(Optional) Install PCL Reference Assemblies for newer PCL profiles 4-(可选)为更新的PCL配置文件安装PCL参考组件

after installation copy 4.6 PCL assemblies from 安装后,从以下位置复制4.6 PCL组件

C:\\Program Files (x86)\\Microsoft .NET Portable Library Reference Assemblies 4.6\\PortableReferenceAssemblies.zip

to

C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETPortable

5-Reinstall Xamarin Suite 5-重新安装Xamarin Suite

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM