重用MonoDroid的MonoTouch的图书馆 [英] Reuse MonoTouch library on MonoDroid

查看:174
本文介绍了重用MonoDroid的MonoTouch的图书馆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够轻松地使用端口MonoTouch的一个现有的.NET桌面应用程序到iPhone。作为这一过程的一部分,我要创建我的所有项目的新的iOS'版本' - MonoTouch的类库项目从我现有项目链接的文件。这个伟大的工程。

I was able to easily port an existing .NET desktop app to iPhone using MonoTouch. As part of that process, I had to create new iOS 'versions' of all my projects - MonoTouch class library projects linking the files from my existing projects. This works great.

现在我想做一个MonoDroid的端口。可我只是引用我的iOS库?或做他们需要MonoDroid的类库?

Now I want to do a MonoDroid port. Can I just reference my iOS libraries? Or do they need to be MonoDroid class libraries?

的MonoTouch的和MonoDroid的轮廓似乎是相同的,基于文档

The MonoTouch and MonoDroid profiles seem to be the same, based on the documentation:

<一个href=\"http://monotouch.net/Documentation/Assemblies\">http://monotouch.net/Documentation/Assemblies
http://mono-android.net/Documentation/Assemblies

http://monotouch.net/Documentation/Assemblies http://mono-android.net/Documentation/Assemblies

有没有人使用MonoTouch的类库与MonoDroid的?

Has anyone used a MonoTouch class library with MonoDroid?

在此先感谢

推荐答案

如果您正在使用的MonoTouch 4.0的的装配不引用 monotouch.dll (直接或间接),那么你只需要从单声道引用大会的Andr​​oid项目。

If you're using MonoTouch 4.0, and the assembly doesn't reference monotouch.dll (directly or indirectly), then you just need to reference the assembly from your Mono for Android project.

请注意,在这个时候你只能引用组件(的.dll ),而不是项目( .csproj的)。

Note that at this time you can only reference the assembly (.dll) and not the the Project (.csproj).

反过来也应该是真实的(引用一个单声道为Android组装,并在您的MonoTouch项目中使用,只要单为Android装配不引用 Mono.Android.dll )。

The reverse should also be true (reference a Mono for Android assembly and use in your MonoTouch project, as long as the Mono for Android assembly doesn't reference Mono.Android.dll).

如果此休息,请提交错误:我们完全打算在MonoTouch的和Mono为Android的API是互相兼容。 (只要有可能,那就是;东西,如 System.Reflection.Emit 将永远在两个平台上的支持,除非/直到苹果公司删除了JIT限制)

If this breaks, please file a bug: we fully intend for the MonoTouch and Mono for Android APIs to be compatible with each other. (Whenever possible, that is; things such as System.Reflection.Emit will never be supported on both platforms unless/until Apple removes the JIT restriction.)

这篇关于重用MonoDroid的MonoTouch的图书馆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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