C# developing tools on OS X - c#

I was told that VisusalStudio has no version for Mac. So what should I use if I want to develop in C# on Mac ? Anybody has experiences with this ? I'm looking for native IDE, I don't want to run VS using VirtualBox or any virtualization solution.
And if I create application with WPF GUI will it run on Mac ? Or is WPF only for Windows GUI developing ?

MonoDevelop is a free open source IDE based on the Mono project. There's builds available for Linux, MacOS X and Windows.
For GUI development, you'll need to use the GTK+ framework included with Mono - there's no plans to implement WPF on any platform other than Windows. GTK+ is cross-platform, though, so you can compile the same app for MacOS, Windows and Linux if you need to.
EDIT: It appears MonoDevelop also supports WinForms - http://www.mono-project.com/WinForms
There are a couple of alternative IDEs but nothing comparable to MonoDevelop in terms of features - but you can always just write C# code in your favourite editor and compile it using the Mono build tools, of course.

WPF can run on any environment that supports it in its runtime environment. Currently that is only Windows since the Mono project has no plans to implement WPF

Check out the Mono Project.
For an IDE check out MonoDevelop.
You can also check out the MonoTouch to develop to the IPhone.
As already mentioned WPF isn't supported but they do mention an alternative:
Silverlight implement a subset of the
WPF APIs and is available on Windows,
MacOS X and through our own open
source effort Moonlight it is
available on Linux and other Unix
systems.

As far as I know there is no complete IDE that support C# with intelli sense, etc.
So Vmware Fusion + Windows including Studio in Unity mode will be it :)
Simple C# syntax highlighting you can get with textmate.

Related

Running Mono C# projects on Mac ... and Winforms

For the first time I am trying Visual Studio for Mac and I located a tutorial for writing a exe that shows a window with a simple menu.
My two questions are:
How does a user of a Mac get the Mono platform? I can't find instructions for deploying Mono. When I look in my exe folder there is no other files. Just the exe.
Maybe this should be a different question but I could not find any "WinForms" version in Visual Studio for mac. I had to use Gtk2 (I think).
If there is a better place to ask these questions please direct me. Thanks.
I know understand that the best course of action was:
Create a Xamarin.Forms multi-platform project.
Create a Cocoa Mac OS project.
Add a reference to project 1 into project 2.
Using Nuget Package Manager download Xamarin.Forms into each project.
Now it is easy to create an application with XAML (similar to WPF).
Visual Studio for Mac creates the multi-platform project (step 1 above) automatically with the Android and iOS platform builds, but not the macOS.
I also see that I don't really need to download Mono as it is all dealt with automatically.
.NET Core does support Mac and Linux. And even though .NET Core now supports Windows Forms. Windows Forms is only supported on Windows. It's unlikely this will ever change due to Windows Forms dependency on the Windows APIs.

Winforms or XWT GUI designer for Mono?

I am new to programming and I am interested in developing applications in C# using Mono. I would like to choose a GUI framework other than GTK+: either WinForms or XWT (https://github.com/mono/xwt).
Is there a designer to design WinForms GUIs? What about one for XWT? I am using MonoDevelop as my IDE.
If there is no designers for either WinForms or XWT, do you think it possible to write the application in C# in .NET with WinForms using Visual Studio 2012 and just compile it using Mono when I want to deploy?
That's probably two questions.
1.) What are my Mono GUI RAD options?
If you want a Mono GUI RAD your only choice is GTK# as far as I know.
If you want a GUI RAD for Windows.Forms, it's called Visual Studio (or potentially VS Express for Desktop in Win8) and requires Windows/working outside of MonoDevelop. ;) On the plus side, it's a really good GUI RAD.
2.) What GUI framework is best for writing once and running everywhere?
Gtk#. Unfortunately, Mono's Windows.Forms doesn't work well and is a dead end tech. See here for a similar question.
As I mention in an answer there, if you want to write a utility that targets multiple OSes in Mono (or you're Linux-centric), you probably do want Gtk#. If you want to create a traditional client app, prepare to rewrite your GUI on each target platform.
Edit: Less nepotistic question on a similar subject here.
Edit2: There is a Mono WinForms designer that I forgot about here, but its description readily admits that, "Unfortunately the designer is not ready yet for proper use," and the blocking bug they refer to is from 2007, so not much help.
Good luck!
Looking at current direction of mono who driven by Xamarin, they promotes the native UI for each platform. means you writing business process as separate project and GUI for each target platform. as for desktop, using XWT is preferable as you will uses similar API to access native UI in each platform, without loosing ability to add more advance UI for each platform.
XWT API is based on GTK# API (easy for Xamarin folks to migrate their existing apps), and provides with lot of common widget/control which implemented for each target platform (WPF for Windows, Cocoa for Mac, GTK for Linux). furthermore it easier to add advance/custom widget and hosted in XWT as it actually like hosted in native toolkit in each platform
Update:
About Winform is already answered, for XWT seem no designer yet, but for deploying, just creates projects XWT GUI (Shared all XWT GUI), XWT.WPF (XWT launcher for windows) and XWT.Cocoa (XWT MonoMac application for Mac). But the each launcher only can be compile in each platform

Customizing MonoDevelop to enhance productivity and coding enjoyment

I'm new to C#, and although my office machine is based on windows, my netbook only has linux on it. I installed monodevelop, and so far everything is working fine.
I was just wondering if you had any tips or must dos for any person who is using monodevelop for c# / asp.net programming
Edit
Feel free to recommend open or closed source tools that are useful with mono develop
Settings I should change / modify to get a better coding experience?
MonoDevelop requires you to do coding in most cases, as it only supports visual designer for GTK# projects. Therefore, you should try to learn ASP.NET MVC which suits the case.
If you plan to use ASP.NET WebForms, you'd better use Windows, and Visual Web Developer (Express if you cannot afford Professional and upper).
You could use #ifdef .. to make one Project which can be compiled with Mono + VC#

Anyone know the state of cocoa#?

Having just updated Mono to 2.6.3 (on OS X), I noticed in the installer that cocoa# 0.9.5 is also installed. However using MonoDevelop there are no cocoa# project templates by default, and I was wondering if anyone knew more about creating cocoa# apps.
If you goto the cocoa# page on the Mono site you can see it hasn't been updated since 2008, and cocoa-sharp.com has nothing on it at all now.
Has this project fallen by the wayside? If so, does anyone know of any alternatives? Winforms apps running under X11 are butt ugly and GTK# isn't much better.
To have a solid bridge between Mono and Cocoa would be ideal for developing OS X desktop apps, in the same way as the MonoTouch does with Cocoa Touch for the iPhone.
Any thoughts?
Cocoa# doesnt seem to be maintained anymore, but take a look at MonObjc.
Also interesting: Heads-up: new Mono bindings for OSX.

Development environment for C#

Could you introduce me a development environment you recommend for C# on Mac?
You want Mono for OS X. Download page. And for an IDE, MonoDevelop.
I migrated some months ago from windows to mac.. it's been a long while since the last time i logged into windows, and I was a C# freak.. so back on mac i tried using Mono, and.. i was really dissapointed because it's not like in Windows: you have a weak IDE to work with and it seems so.. poor! Then i decided to make the big step and switch to objective-c and Cocoa! And now i'm happy again as i was on windows. So, my point here is if you wanna keep going with C#, stick to the windows platform.. but if you want to develop mac apps, try moving to objective-c and Cocoa!
You can also try WINE thats sort of emulator for windows programs on Mac/Linux and you can try installing .net and SharpDevelop tools, and use mono to create output, the benefit is you will get little rich tools to do your development.
TextWrangler + Mono
Parallels + UltraEdit + command-line compilation
Parallels + Visual Studio
I'm downloading MonoDevelop now, haven't tried it in awhile.
I use VMWare Fusion to run Visual Studio in a Windows virtual machine. I'd only recommend this if you've got a fast Intel processor with at least 4GB of ram.
Fusion also offers a "Unity" mode so that Visual Studio would look like it's being run as a native Mac application. A great concept, but in practice it uses way too much RAM and processor.
Otherwise you could use boot camp to run Visual Studio in Windows. This gives you the full strength of your hardware resources but you have to boot to use it.

Categories

Resources