44

I want to know if it is possible to run Xamarin on Ubuntu. I don't like java, so I want to make Android apps with C#.

Is a package for Ubuntu, because I haven't seen one so far?

Or...

Can I run Xamarin on Ubuntu using Wine?

Or...

Is there an alternative software (with the same capabilities) that runs on Ubuntu?

Michael Celey
  • 12,645
  • 6
  • 57
  • 62
rqmok
  • 834
  • 2
  • 9
  • 20
  • it seems a good news from reddit: [I am Miguel de Icaza. I started Xamarin, Mono, Gnome with great friends. Ask me anything.](https://www.reddit.com/r/programmerchat/comments/4dxpcp/i_am_miguel_de_icaza_i_started_xamarin_mono_gnome/) – Paolo Apr 19 '16 at 17:28

3 Answers3

31

Xamarin has stated on several different occasions that they have no plans to support Xamarin Studio on Linux in the short term. The main reasons are:

  • They would have to create a self-contained Mono runtime to go along with the IDE, since different flavors of Linux would ship with different Mono support
  • The cost to support many versions of Linux would outweigh the benefits
  • Lack of commercial demand to pay for support
goric
  • 11,491
  • 7
  • 53
  • 69
  • 7
    Yes, I have already read that on the Mono website, but I also asked for alternative. Some other framework that would let me program in c#. One that can be used on Linux. – rqmok Apr 10 '13 at 07:14
  • 11
    This doesn't answer the question. He asked if it's possible, not if it was officially supported. Also you list no valid reason. The first "reason" are only valid if they are to support more than one Linux flavor which was not a requirement stated by the question asked. In fact most commercial software only support a few Linux distributions. The same thing with "reason" number two. And the last reason are really not supported by any fact. There are no evidence of lack of commercial demand here. In fact I would buy instantly, and how many others that would buy would require market research. – user1657170 Sep 22 '14 at 10:50
  • 2
    Another framework would be MonoGame or Unity. Both are C# and Linux. – user1657170 Sep 23 '14 at 11:39
  • 5
    "The cost to support many versions of Linux would outweigh the benefits", sorry for my language, but this is bullshit... they only have to support 32 and 64 bit, and that is only a difference in compiling. support for native installation in different distros will be managed by people of the distros themselves. reason 1 is also not something they should be worrying about, and for what I can see on the internet, there is no lack of demand at all. These are just excuses. – switch87 Nov 26 '15 at 08:52
  • 1
    I don't understand why it should be a problem to support Linux. Monodevelop is available for most linux distros (there are packages either by Xamarin on by distro vendor). Android addin should be installed via addin manager in monodevelop and should be linux distro independent, shouldn't it? So they would need to create just one linux build (or two for x86 and x86_64). If I would like to develop Android apps using Monodevelop (or Xamarin Studio) I would need to buy Windows or buy a Mac with MacOS. I don't want to buy any of them. I'm ready to pay for Android addin for Monodevelop. – Martin Edlman Dec 18 '15 at 10:41
5

Probably worth mentioning that Miguel de Icaza (CTO of Xamarin) at least considered that Xamarin support a single distro of Linux in 2011. He's pretty approachable, and often answers questions on IRC. It might be neat to ask if they've revisited that option, even if it didn't support any sort of GUI RAD.

Just as an alternative to, "No, you absolutely can't develop for Xamarin on Linux," I've often considered using MonoDevelop on Linux to develop my faceless, shareable code. In a way, I already do something similar when I'm using my Windows laptop. You can't use Xamarin Studio to develop for iOS on Windows, so I stub out a plain console project and have it call my controllers that live in another library project. I prefer Visual Studio to Xamarin Studio (and am using Starter & Indie licenses, so I can't use Xamarin for Visual Studio), so I like to do faceless development on Windows. Then, when I'm "done" with (ie, ready to take a break from) the faceless dev, I head over to Xamarin Studio on OS X to hook things up to the iOS UI stubs I made there.

It'd be easy enough to do that on Linux "for Android", and only use Windows or OS X when you develop your UI and create your distributable. Admittedly, the UI is usually a ton of code (always more than I expect, at least), but you could easily get away with good, well-factored libs developed on Linux for let's say half of your coding or more. And it forces you to separate your concerns nicely, which I always appreciate.

EDIT: I feel someone should point out that Mono-qua-Mono does run on Linux already. It's just the Xamarin stuff -- the glue to the more popular consumer platforms -- that isn't on Linux. So you can run Xamarin Mono on Linux just fine right now, and have been able to longer than Xamarin's been "a thing". ;^)

ruffin
  • 16,507
  • 9
  • 88
  • 138
0

There are a couple steps you need to follow to build Xamarin.Android apps on Ubuntu.

  1. Install the alpha version of mono (currently 5.8), directions are on their site (also reinstall mono-complete after adding the ppa key).
  2. Follow the instructions at the following repo: https://github.com/xamarin/xamarin-android

It's a slow process and downloads its own temporary NDK and other things, but it should work.

gamesguru
  • 92
  • 1
  • 3
  • 6
  • It says "build failing" for "OSS Ubuntu" – Aaron Franke Jul 02 '18 at 01:20
  • You can obtain the latest azure artifacts from team Xamarain at this link: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-linux/lastSuccessfulBuild/Azure/. They have not push a successful build to the Linux side in 49 days. Generally support is fantastic, but not quite the 100% they claim. – gamesguru Jul 03 '18 at 01:48