Uther Pendragon
Uther Pendragon

Reputation: 302

How to use Xamarin or Mono to make a c# .net project available on multiple platforms?

I have a visual c# project written in .net framework. I know that .net yields a .exe file which runs only on Windows. I would like to run my c# project on Mac and/or Linux, not just Windows. I do not have too much experience in software development, but I have been told to try to use Mono and/or Xamarin to be able to run the project on cross-platforms.

I have downloaded and played around with Mono and Xamarin, but can not find a way to "render" a version that would run on cross-platforms.

Could anyone explain me how this works and maybe a complete procedure to get the the desired product ?

Thank you anyways. A confused, but motivated student

Upvotes: 0

Views: 194

Answers (2)

Peter Lea
Peter Lea

Reputation: 1751

mono/xamarin.ios/xamarin.android only provides a subset of the full .net runtime. Plus depending on what version of mac-os/ios etc that you choose you may have a smaller subset still.

You need to look at exactly what versions of each OS you want to support and then try and build your program/app around the commonly available features. If you've used features that aren't available you will need to rewrite them in a manner that works on all, or write platform specific code for each and use them via an interface.

Unless you're more specific on individual issues it's difficult to help you. It might be easier to look at the xamarin sample apps that do something similar to your app and try to follow their guidelines. They might have used better practices and it'll help you learn in the process.

EDIT

a comparison list of features that mono implements here. You'll have to dig into which version would work with you, I haven't worked with mono, only the xamarin variants.

Upvotes: 2

JKennedy
JKennedy

Reputation: 18799

http://developer.xamarin.com/guides/cross-platform/application_fundamentals/pcl/introduction_to_portable_class_libraries/

This link will help explain Portable Class Libraries. Essentially a library is created that is compatible with android, windows phone and ios. (this is a library (a .dll) not an .exe output like you said, you have been misinformed that visual studio only has an .exe output). If you set up a portable class library project in xamarin it will set up a default project that will be able to render android, WP and ios.

Here is another link helping you set up a portable class library project in Xamarin: http://developer.xamarin.com/guides/cross-platform/application_fundamentals/building_cross_platform_applications/part_3_-_setting_up_a_xamarin_cross_platform_solution/

Upvotes: 1

Related Questions