porting VB.NET desktop app to Mac OSX

I've been poking around with this for a while and haven't found any good answers: is it possible to port a VB.NET desktop app to OSX by compiling the code in Xamarin Studio? I've tried and failed, but I want to know if it's impossible or if I'm just doing something wrong. Is there any documentation on how to do this if it's possible?


  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    It depends what you mean by "port".

    While mono does some some WinForms supports, in general most desktop Mac applications need to use the "native" APIs to look even reasonably "Mac-like".

    Often people who are porting an application from Windows will separate their logic to a separate .NET assembly, and write a new UI using the native toolkit (Cocoa - Xamarin.Mac). Since Xamarin.Mac is just C#, they can reference this assembly, assuming it uses no platform specific code.

    I've never tried with VB.Net, but I believe it compiles to standard .NET desktop assemblies? If so, then in theory the same path is forward.

    But in any case, you'd be rewriting the UI most likely. OS X doesn't have WPF, and as I mentioned the WinForms support doesn't look very native.

  • ErikNielsenErikNielsen USMember

    Thanks for the reply. I don't really need it to look native, just to be usable. However, I wasn't able to get it to build an exe. Even with diagnostic logging, I just got to the point of a generic FAILURE on that step of the build.

    Basically, I started from just opening the project from the Visual Studio project and got to the point past finding where mono's installed, etc. However, maybe the problem is I don't know how to transform it into a WinForms project.

    The long term solution is to write a web front end, so I'm not really invested in developing a native OSX UI for this, just seeing if we can do something quick and dirty. But from my years of experience, usually quick and dirty turns into long and dirtier.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    You can't necessary "transform" it into a WinForms project. It depends on which UI framework you are using, and if mono supports that. Maybe you can check your project references to see.

    You can get more information here: http://www.mono-project.com/docs/gui/winforms/

    However, WinForms is far outside of my area of expertise, so any help I could provide would be rather limited.

    If mono doesn't support whatever UI technology used, you'd need to at least re-write the UI.

Sign In or Register to comment.