Nir
Nir

Reputation: 29584

Can we run a C#/WPF application on Mac OS X?

I sell a C#/WPF application (targeting .net 3.0 at the moment) and people keep asking me for a Mac version.

The application is a time tracking application with a good GUI, there isn't that much business logic in a time tracking application so most of the application is GUI - rewriting just the GUI is equivalent to rewriting the entire application

I don't have the resources to rewrite the application or maintain two different code bases, so I need a way to run the same code on a Mac (I know I'll have to debug and modify the code, what I mean is I can support only one code base, I can't split the project into different Mac and Windows projects - I just don't have the time to work on two projects).

Porting the application to a cross-platform UI library, to a different programing language or to Silverlight are all not relevant - it will take too much time and I think I'll get more sales by investing this time in new features.

Does anyone know of a tool that can run or port C#/WPF to the Mac?

Upvotes: 51

Views: 89527

Answers (10)

Bronson S
Bronson S

Reputation: 11

I had the same problem with WPF and found a more simple/secure solution. I ended up using Unity to create a C# UI interface that works on MacOS, Windows, and more. Here is a basic tutorial I made on how to do it: https://medium.com/@A51/how-to-easily-develop-a-c-ui-app-that-works-on-mac-and-windows-8eaf32ea0ed6. I am happy to help with any questions I can.

Upvotes: 1

adabru
adabru

Reputation: 774

Another commercial solution is NoesisGUI (free for <100K gross annual revenue). It is a cross platform UI framework based on WPF/XAML. There is a guide for migration from WPF.

Upvotes: 1

Ivaylo Milanov
Ivaylo Milanov

Reputation: 180

You can try Nevron Open Vision. It integrates in WPF,WinForms,Silverlight and MonoMac, Xamarin.Mac projects. This is not like running a WPF application on the Mac, but will rather require you to recode your application on the NOV platform. However once you do that your application (or modules) will run on all these platforms from a single code base. A nice example of this approach working is Nevron Writer (part of Nevron Office). It runs on Windows, Silverlight and Mac from a 100% single code base.

[Disclosure: I Work for Nevron]

Upvotes: 2

Kelly
Kelly

Reputation: 7183

You can use Parallels. I have our office software written in C# and WPF and people use it on Mac under Parallels all the time.

As a further note, Parallels lets you run Windows Applications side by side with Mac OSX applications, visible in their own window on the Mac desktop. It also allows copy and paste and drag and drop between Mac and Windows apps.

Upvotes: 5

VOX
VOX

Reputation: 2923

Actually, there's a CrossOver for you. Other people who answer view from programmer's point. IF I were you, I'll install CrossOver then install .NET 3.5 inside CrossOver and happily run the WPF software.

http://www.codeweavers.com/products/cxmac/

or if you prefer a free (but more difficult) solution, try wine.

http://davidbaumgold.com/tutorials/wine-mac/

Upvotes: 1

madhatter
madhatter

Reputation:

We had a similar issue. We wrote a Mac version in Silverlight 3 (which supports quite alot of WPF .NET stuff). It was sandboxed but if this isn't a problem, you can do some nice stuff. Our codebase is now on WPF and Silverlight 3 and is the same, when we compile it produces the SL3 and Desktop apps.

Upvotes: 9

Iain M Norman
Iain M Norman

Reputation: 2085

We were in a similar situation. We had a working Windows project and wanted a Mac version.

Our product was in two parts, one a .Net application, the other a Director projector app.

The Director app should be easy right, cross platform and all? Well nope, it rarely is that easy, we ended up with two versions of the Director source file.

Getting the .Net app running required using Mono for the underlying engine, which worked well for us as we were only number crunching byte arrays really. The UI on the otherhand we had to rewrite in Cocoa. It cost us nearly as much as making the Windows version did, as we also had to learn all the Mac stuff as we went.

Since then we've only updated the Windows version.

Upvotes: 8

Rick
Rick

Reputation: 3451

You want a new feature (support a entire different platform) and you wish to put no effort in it. Sorry, most of the time that will not work.

Besides the most basic (native) .NET stuff with mono, I do not think you can run a WPF application natively on MacOSX.

If you think you can make more money by gaining Mac users. You might consider using other presentation methods. Due to your current 'investment' I'd say try Silverlight (yes, I read your rant about not doing so). Another option could be Adobe AIR / Flex.

If you port your application this way. You can maintain a single codebase.. one that runs on both platforms.

If you wish to spend more time on new features in your current codebase: ignore the Mac users.

Upvotes: 3

Dmitri Nesteruk
Dmitri Nesteruk

Reputation: 23789

It cannot be done. But since your UI is in WPF, what you could do is transform XAML into something else - like GTK# for example. Of course, if you're like me and use lots of .NET 3.5 functionality, that won't help you much.

One more reason to keep your UI in plain, simplistic XML to start with.

Upvotes: 1

Anton Gogolev
Anton Gogolev

Reputation: 115711

There's absolutely no way you can run full-fledged WPF app on Mac. I'm not even sure if this is possible in Parallels. The best thing you can do is to use Silverlight, which was previously named "WPF/E" and does run on Macintosh.

Upvotes: 15

Related Questions