Two very quick questions on this:
1. Is this .Net installed on the mac, or just an IDE for C?
2. If this is .Net installed, does it support VB?
Thanks.
Printable View
Two very quick questions on this:
1. Is this .Net installed on the mac, or just an IDE for C?
2. If this is .Net installed, does it support VB?
Thanks.
I do quite a lot of development on a Mac using XCode/Swift.
Just the other day I noticed the OSX version of Visual Studio on my Mac. I can't remember where I got that. Maybe I installed it while I was messing around with xamarin last year.
Anyway. I was curious so I copied a Visual Studio (C#) 2010 project from a Windows machine. Opened it with the Mac version of Visual studio and there it was. All the source code. Only thing I couldn't figure out was how to get was the wysiwyg /Forms/GUI working. Maybe the forms ui doesn't exist.
Anyway. I hit the build button and it built. Wierd.
It built a file with the EXE extension.
Ran it and it crashed but that was expected because the first thing that application does is read some data from the windows registry and some other windows specific stuff. But the way it crashed kind of suggests that it had at least tried to run.
Anyway. I was busy at the time so didn't spend longer. But my curiosity is certainly peaked.
You have some choices, I'm not sure how good all of them are. Long story:
Mono has a Visual Basic compiler and despite that page saying it's "relatively new", the versions of Mono discussed in the article are years old.
If you go down one path, you'll end up downloading Xamarin Studio for Mac. That's technically obsolete, and will immediately ask that you upgrade it to Visual Studio for Mac. VS for Mac is about a month newer than the newest Xamarin Studio, and is more or less the same product with the word "Xamarin" replaced by "Visual" in the resource strings. In the future, there will be no new versions of Xamarin Studio and all new work will be in Visual Studio.
Whether you can "write an app" for Mac depends on several factors, some of them being how you define "an app". Xamarin's own documentation seems to indicate while they'll load a VB .NET project, to compile and build you're going to have to use Visual Studio on Windows. The thing is, almost no one in the VB world gives a flip about Mono, and the only way open-source projects get a feature is if someone cares about it. So the Mono project doesn't really give a flip if VB works on the Mac, and the only way that's going to change is if a bunch of VB developers put work in to make the open-source tools work with VB.
Console applications should work. I just tried, but "Hello World" failed with an error that indicates Xamarin is probably right and they don't support VB. If I wrote an app in VS for Windows I'm pretty sure I could get it working on Mac, especially if I compiled against Mono instead of the MS .NET Framework. The trick is not directly running the .exe but instead telling Mono to run it.
For a GUI, supposedly Mono has an implementation of System.Windows.Forms, but there won't be a drag-and-drop designer or any of the nice things you probably expect out of VB. There is also GTK#, which is more oriented towards cross-platform UI, with similar concerns. There is a Xamarin for Mac library that promises to help you build MacOS-native UI, but it's not free and is actually quite expensive (at least $500.)
Short story:
It doesn't work very well. VB developers don't tend to care about non-Windows platforms, so the people enabling .NET for non-Windows platforms don't tend to care about VB. As far as I can tell practically no one is bothering to try it, so even if there's a way to make it work the odds of finding a good, explanatory blog are slim. The most probable way to get VB .NET code working on a Mac right now is to write the application on a Windows machine, then deploy it to the Mac machine.