使用 monodevelop 和 monotouch 来组装 Visual Studio 2010
我是 monodevelop 的新手,我有一个问题。 我有一些在 Visual Studio 2010 中用 C# 开发的程序集,我想在 Mac 中将它们与 monotouch 一起使用,我的问题是:我是否必须使用源代码并在 Mac 中使用 monodevelop 生成程序集,还是只需要程序集并添加他们以我的解决方案作为参考?
I'm new in monodevelop and I have a question.
I have some assemblies developed in Visual Studio 2010 in C# and I would like to use them with monotouch in Mac, my question is: do I have to use the source and generate the assemblies with monodevelop in Mac or just I need the assemblies and add them to my solution as a reference?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
MonoTouch 使用的框架配置文件最初基于 Silverlight 配置文件(又名 2.1),并进行了更新以包括 .NET Framework 4.0 提供的部分(但不是全部)新 API。
因此,您可能能够重用程序集,而无需重新编译它们。这将取决于所有 API 是否可用、是否引用 MonoTouch 中不可用的程序集、在什么配置文件(3.5 或 4.0)下构建代码……
但是事情会更容易 如果您有源代码并且能够在 MonoDevelop 中重新编译它。这将为您提供调试符号(.mdb 文件),还可以在编译时(而不是运行时)捕获并使用任何缺失的 API(来自 MonoTouch)修复代码。
The framework profile used by MonoTouch was originally based on the Silverlight profile (aka 2.1) and was updated to include some, but not all, of the new API provided by the .NET framework 4.0.
As such you might be able to reuse assemblies, without recompiling them. That will depends if all the API are available, if you refer to assemblies not available in MonoTouch, under what profile (3.5 or 4.0) you're building the code...
However things would be a lot easier if you have the source code and are able to re-compile it inside MonoDevelop. That would provide you with debugging symbols (the .mdb files) also also catch, at compile time (not at run time), and fix code using any missing API (from MonoTouch).
您应该能够使用与它们相同的程序集(无需重新编译)。如果程序集依赖于其他非标准程序集,则可能会变得棘手,您可能必须将其他程序集与您想要的程序集一起部署,然后如果它们不是开源的或需要许可证才能重新分发等,则可能会导致其自身的问题。试一试,看看会发生什么。
You should be able to use the same assemblies as they are (no need for a recompile). If the assemblies depend on other nonstandard assemblies it might get tricky and you may have to deploy other assemblies along side the ones you want and then that may cause it's own problems if they are not open source or licenses are required to redistribute, etc.. Give it a shot, see what happens.