Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing with C# on OSX and Mono

Tags:

c#

macos

mono

I'm about to start a project that requires me to write c# code. The thing is, I've got a mac.

I was wondering if there are any pitfalls involved in c# development using mono on OSX 10.6

I think the page is clear that the implementation is crisp, but on the other hand I've read that people install VMWare or something like it to use Windows. I'd like to avoid that if possible.

Note

I'll be working on a team and all the other guys have Windows machines

Thanks

like image 566
Pablo Fernandez Avatar asked Apr 25 '11 23:04

Pablo Fernandez


People also ask

What can I develop with C?

C is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, and so on. C programming is an excellent language to learn to program for beginners. Our C tutorials will guide you to learn C programming one step at a time.

Is C good for development?

It gives you the best of both worlds Low-level languages process programs faster, while High-Level languages are more user and developer-friendly. The C is a mid-level language that combines the best of both. It is simple to understand, easy to use, and processes programs faster.

Is C good for AI?

It is a programming language for time-sensitive AI/machine learning projects. It works great with statistical AI approach, which is a part of neural networks. C and C++ were also used for the development of numerous machine learning/deep learning libraries.

Can I use C for web development?

C is general-purpose and one of the oldest yet commonly used languages in web development. It is the basis of other programming languages, such as C++ and JavaScript. It is a middle-level programming language that is versatile since it can be used for scripting for drivers and kernels and software applications.


1 Answers

Based on your comment to HiVoltRock's answer (ASP.NET development), I'd say Mono 2.10.1 and MonoDevelop will be just fine (the stable release of MonoDevelop works just fine, but for development on OS X I prefer to use the most recent version which I compile from Git).

There are some things to take into account, such as file paths (ie: if the windows devs are writing static paths such as ApplicationsInstallDirectory + "\data\templates\foo.bar"; you will run into problems as directory separators on Mac OS are forward slashes. Also if existing code is using P/Invoke or other specific Window's functionality you'll be in trouble.

Finally if your code base uses third party libraries that requires Windows this could cause you issues.

For reference our product has been designed since day one with a requirement that it runs on Mono on Linux or OS X. With that in mind we've made sure to consider everything with cross-platform execution in mind. If you're joining an existing product, the same considerations might not have been given, meaning a lot of the existing code isn't compatible with Mono.

The Mono Migration Analyser will help determine if you've got any incompatible code.

There is a bit of fud out there about developing under Mono. Our project is an MVC3 with Razor, running .NET 4 using NHibernate, StructureMap etc and there haven't been that many issues developing on a non-Windows machine.

like image 189
Michael Shimmins Avatar answered Oct 06 '22 22:10

Michael Shimmins