Reputation: 5006
So I'm trying to figure out how to create an assembly with core functionality which can be used with Windows Phone 7-, Desktop-, and Monotouch-enabled devices. How do I set this up in MonoDevelop?
If I create an assembly the usual way, I can't add it as a reference to my monotouch project, but can I add a monotouch-assembly to desktop or even wp7 devices?
As a side question. Has anyone ever tried cross-platform development where one guy sits on visual studio, and another sits on monodevelop? How does this work out? Thanks!
Upvotes: 3
Views: 662
Reputation: 26
My solution was to create a regular c# class library project with the shared code. Then create a monotouch class library and add links to the code from the original class library. Same done for monodroid project.
This way updating the .cs files in one project will update the others.
Upvotes: 1
Reputation: 1299
you cannot compile the source code directly to an assembly that you can just link in projects for different platforms.
For example in Monotouch and Monodroid particularly and this is because it uses AOT (ahead of time) compiler to create the binary output.
Therefore all the SDK is linked within the "assembly" which in fact is a specific and tailored for the specific platform.
So to do that, you need to share the project as a source code, which works well across the platforms, if you follow some rules (like use Mono even on Windows, just to be sure).
Upvotes: 1