MonoDroid 和 MonoTouch 的可移植类库 [英] Portable class library for MonoDroid and MonoTouch

查看:32
本文介绍了MonoDroid 和 MonoTouch 的可移植类库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为 MonoDroid 和 MonoTouch 创建 PCL,以共享代码 AES 加密 (RijndaelManaged),但 Visual Studio 不允许我这样做,而是强迫我添加所有其他框架,消息如下:<块引用>

将自动选择以下框架,因为它们支持可在您选择的其他框架之间移植的所有可用功能:用于 Windows 应用商店应用的 .NET、.NET Framework 4.5、Windows Phone 8.

那些框架不支持 System.Security.Cryptography 命名空间.

MonoDroid 和 MonoTouch 的文件放在 C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETPortablev4.5ProfileProfile78SupportedFrameworks,Witch 已经包含了 Windows Store 应用程序的 .NET.、.NET Framework 4.5.xml、Windows Phone 8.xml.

有人可以建议如何将 Mono 框架与其他框架隔离,我是否需要新的配置文件或其他东西.

解决方案

Afaik 拥有适用于 Xamarin 产品的 Visual Studio 无 PCL 配置文件.所以你不能选择它.

您可能想要尝试启用:.NET >= 4.0.3 和 Silverlight 5 以获得应该与 Xamarin 产品兼容的配置文件.

I want to create PCL for MonoDroid and MonoTouch, to share code AES encryption (RijndaelManaged), but Visual Studio wouldn't let me to do so, instead it forces me to add all other frameworks, message is following:

The following frameworks will be selected automatically because they support all of the available functionality that is portable between the other frameworks you have selected: .NET for Windows Store apps, .NET Framework 4.5, Windows Phone 8.

and those frameworks doesn't support System.Security.Cryptography namespace.

Files for MonoDroid and MonoTouch are placed in C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETPortablev4.5ProfileProfile78SupportedFrameworks, witch already contained .NET for Windows Store apps.xml, .NET Framework 4.5.xml, Windows Phone 8.xml.

Can somebody please advice how to isolate Mono frameworks from others, do I need new profile or something else.

解决方案

Afaik has Visual Studio no PCL profile for the Xamarin products. So you cant select it.

You may want to try to enable: .NET >= 4.0.3 and Silverlight 5 to get a Profile that should be compatible with the Xamarin products.

这篇关于MonoDroid 和 MonoTouch 的可移植类库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆