Question

I really want to write .NET apps that run on any platform (PC, Linux and Mac). I am not really concerned about UI capabilities because these are mostly background services. I have heard of MONO and that it allows you to write .NET apps that run on Mac and Linux, but I want to be able to write a single app that when compiled for Windows will run as a Service, and when compiled for Linux will run as whatever the UNIX equivalent is. I also would like to be able to store things in the registry and have that work. Is there any way to write truly OS agnostic code like this? ...and DON'T say I should make it run on the web! :)

Was it helpful?

Solution

Yes, Mono has the windows service stuff ported to Linux, but you are going to have to think of a better way to store configuration settings than Registry... Using XML files for instance would be cross platform.

You should also check out mono's wiki on how to develop portable applications here.

OTHER TIPS

Short answer: no. You could create an application which will run on both Windows and Linux. But there are platform-specific features and right now Mono could not automatically 'translate' those for you. A Windows Service is a good example of that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top