Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I need a way to cross compile a short piece of .NET C# code to a dll, which will then run a client's Windows environment.

I run OS X 10.9.2 on an iMac.

Does anyone know what tools allow this?

I would rather not install Parallels and Windows if I can find a way to cross compile this without needing that heavy of an installation of Microsoft tools.

share|improve this question

2 Answers 2

up vote 9 down vote accepted

Check out the Mono Project. It may be what you are looking for.

http://www.mono-project.com/Mono:OSX

MonoDevelop is a cross-platform IDE primarily designed for C# and other .NET languages. MonoDevelop enables developers to quickly write desktop and ASP.NET Web applications on Linux, Windows and Mac OSX. MonoDevelop makes it easy for developers to port .NET applications created with Visual Studio to Linux and Mac OSX maintaining a single code base for all platforms.

share|improve this answer
    
monodevelop.com MonoDevelop is a cross-platform IDE primarily designed for C# and other .NET languages. MonoDevelop enables developers to quickly write desktop and ASP.NET Web applications on Linux, Windows and Mac OSX. MonoDevelop makes it easy for developers to port .NET applications created with Visual Studio to Linux and Mac OSX maintaining a single code base for all platforms. -- If you can't compile your code correctly with MonoDevelop, they you may have no choice but to run a VM. –  level42 May 2 at 15:37
    
Thx, I've been looking at Mono, but while it should work, I've found no clear "how to" either install or use it. –  Jagra May 2 at 15:54
1  
@Jagra There are a few tutorial videos here: youtube.com/results?search_query=monodevelop+install+mac –  level42 May 2 at 15:56
1  
Just to iron out any doubt: Yes, if you compile a DLL on Mono, it will run on Windows without any modification whatsoever, given that you don't use any specific Mono libraries, such as Mono.Addin or Mono.Simd. It goes both ways, too - a DLL/EXE compiled on Visual Studio will run unmodifed on Mono, given that you don't use any specific Microsoft/Windows libraries such as WPF, Workflow Foundation, COM+ etc. –  NothingsImpossible May 2 at 23:38
1  
@Jagra: Once you install Mono (and MonoDevelop if you want it) from go-mono.com/mono-downloads/download.html, it's very easy to use. Even without MonoDevelop, you should be able to compile most .sln projects straight from Visual Studio, using xbuild. –  Jwosty May 3 at 3:20

No personal experience with this IDE but this looks like it will work: http://monodevelop.com

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.