44

I love programming with .NET, especially C# 3.0, .NET 3.5 and WPF. But what I especially like is that with Mono .NET is really platform-independent.

Now I heard about the Olive Project in Mono. I couldn't find some kind of Beta.

Does it already work? Have any of you made any experiences with it?

Edit: I know about Moonlight. But I want a standalone WPF application. And because of Moonlight I hope WPF on Linux will become true.

Hades32
  • 914
  • 2
  • 9
  • 12

9 Answers9

23

You'll have better luck working with Moonlight, which targets the Silverlight API, which is a subset of full WPF.

edit: Sure, Silverlight isn't "intended" for the desktop, but there's no reason why you can't embed a silverlight engine in your application. It's been done before, such as for the Mac NY Times Reader

more edit: see Miguel's post on Standalone Silverlight Applications

Jimmy
  • 89,068
  • 17
  • 119
  • 137
  • Moonlight is up to Silverlight 1.0 now. And they've got a slick installer for it (there's a video of the Linux Moonlight install out there, maybe on Tim Heuer's blog). – jcollum Jan 07 '09 at 19:52
  • There's MoonLightDesktop and I wonder if it can be used for this purpose. – ATL_DEV Mar 08 '13 at 15:27
14

Update: Since people keep upvoting this, I want to point out it is long since out of date. Mono got acquired by MS years ago, and their posture regarding open-source has changed, so consider this post obsolete. (As obsolete as the WPF framework itself, heh).

Mono is in a bit of an uncomfortable position when it comes to Microsoft APIs such as Winforms and WPF. A subset of the .Net technology is an ECMA standard, but free implementations of these APIs are probably on shakier legal ground. I believe this was a large factor in the covenant between Novell and Microsoft, which is good for Novell customers. But people who use Mono that aren't customers of Novell aren't protected. For this reason a lot of people in the F/OSS community look askance at Mono despite its technical merits.

For this reason, Gtk# will always be preferred, since it is truly Free. Many people consider it to be superior to Winforms anyway. As far as WPF is concerned, it will almost certainly be a low priority for Novell. They may implement it eventually, but I would expect Moonlight to be the closest you could get for the forseeable future.


Since posting this, Microsoft has extended their covenant to anybody who implements the ECMA 334 & 335 standards.

Adam Lassek
  • 35,156
  • 14
  • 91
  • 107
7

From the mono website

At this point, the Mono project does not have plans to implement Windows Presentation Foundation APIs as part of the project.

Moonlight is an implementation of silverlight, which is a browser based flash like technology based on a subset of WPF.

In my opinion the choice to not implement WPF is monos biggest mistake. As WPF is fast becoming the default choice for new .net user interfaces. See this blog for more.

trampster
  • 8,598
  • 4
  • 37
  • 52
  • 3
    "As WPF is fast becoming the default choice for new .net user interfaces." -- I find this comment interesting, its been over two years since WPF has come out, and I've yet to find anything that uses it. Do you have some links to some things that use it I could check out? Thanks! – jpobst Jan 07 '09 at 23:24
  • 1
    Visual Studio 2010 will be built using WPF, Microsoft surface uses WPF – trampster Jan 08 '09 at 20:35
  • the new live messenger as well – Jab Jan 09 '09 at 21:01
  • PB12 will be generating WPF apps, scheduled for next year. – AndersK Jul 31 '09 at 08:25
  • Moonlight is indicated as WPF "offline" rendered (Out-of-browser capabilities and offline support). But still in roadmap (http://www.mono-project.com/MoonlightRoadmap) – Luca Apr 20 '10 at 19:53
  • This is old question which is still actual. Since Mono is owned by MS, is there any change in WPF-for-Mono plans and future? – i486 Feb 10 '18 at 18:56
  • Mono has essentially abandoned the linux desktop UI. This is hardly surprising given the level of hate directed at the mono community that came form the linux comunity. MonoDevelop/Xamarin Studio still uses GTK2 it never moved to GTK3. GTK#3 has never really been completed. There are no up to date/usable QT bindings. Microsofts interest in mono is the android/IOS stuff. They don't seem interested in the linux desktop at all. And when it comes to the linux server they are pushing .net core not mono. – trampster Feb 12 '18 at 00:09
4

If you check Known bugs of this link(also includes steps needed to install .NET onto Ubuntu)or this you may find that some(may be buggy) version of WPF works on Wine as for now. I did not find any definite test done as for now, but worth to try to run WPF "Hello world".

UPDATE2:

I have run latest IlSpy on latest Wine for Ubuntu 16.04. With 32 bit version of dotnet45 and corefonts installed via winetricks with windows 7 compatibility.

For this time no crashes and all things work fine. Fonts look really good.

IlSpy is shown via WPF and for person who loves programming with .NET is essential tool - the decompiler.

I downloaded latest portable SharpDevelop(build using WPF) with no extra. It started. Failed to create WPF project. Created WinForms. After opening some cs files and evidencing some glitches, tried to type - and it crashed.

IlSpy via Wine on Ubuntu

UPDATE

I followed steps and got latest ILSpy.exe running on Ubuntu 14.4.

enter image description here

Next items to note:

  1. wine stated that dotnet40 is not supported by 64 configuration, changed to 32 bit

  2. fonts are ugly, but readable

  3. basic functional works fine - I can see decompiled code - which is good enough for some development, but View -> Search and View -> Options -> Display crash.

Conclusion:

WPF on Linux is possible. But need some way to tackle issues.

Dzmitry Lahoda
  • 939
  • 1
  • 13
  • 34
4

There is a library called Silverform SDK that aims to provide cross-platform WPF and Silverlight implementation.

The library is implemented in managed code and currently works with OpenTK and Unity3D as render backends. Major functionality, such as binding, layout, main controls and primitives, has already been implemented (check Unity web player demos here). Initially it has been focused on Unity3d render, while support for standalone Mono applications will be added as a separate build in the future.

Disclaimer: I am one of the developers of the library.

Sergii Volchkov
  • 1,169
  • 17
  • 23
2

Yes, it is possible using NoesisGUI a real-time multi-platform XAML implementation. There are a few games already released using this technology in Linux, like VoidExpanse

Disclosure: I am one of the developers of this product.

jsantos
  • 29
  • 3
  • Unfortunately that only covers a small, but heavily used subset of the WPF. Specifically XAML. Still, if someone needs an XAML near drop in solution with commercial support, that looks like a very good choice. – Robert Wm Ruedisueli Jul 03 '19 at 01:49
  • Just downloaded NoesisGUI using VS for Mac and your samples from your forums, but even the HelloWorld example crashes on startup with a null-pointer exception. Have you tested it with the latest Mojave install? Was really excited about this, but this killed me dead. – Mark A. Donohoe Aug 21 '19 at 15:40
  • Yes, we always tests with latest operating systems (Mojave included). Could you please open a thread about it at our forums (http://forums.noesisengine.com/). The list of clients using NoesisGUI in Linux or Mac is huge. – jsantos Aug 23 '19 at 15:35
2

From the Olive home page:

Olive is unsupported, should be considered as experimental software, and since it implements a shifting API there are no guarantees of any kind about the stability of the API.

I doubt anyone would have used it in a real project.

Kent Boogaart
  • 175,602
  • 35
  • 392
  • 393
0

I heard a podcast interviewing miguel de icaza (the mono lead) maybe a few weeks ago, so that would have been maybe mid-december 2008, and he said that they had no WPF support at all yet.

Orion Edwards
  • 121,657
  • 64
  • 239
  • 328
-2

Theoretically, a stripped version of WPF COULD be compiled against WinPR or LibWine to run on Linux.

Currently there is no such setup, so someone would need to make one. Hopefully this might change soon.

As of running against or in a full Wine environment, I think that is seriously overkill and will result in too much bloat to be worth making a very small number of additional programs work.