Let say I started a C# project under Windows (Visual Studio 2008) and I want to switch to Mono. Do I have to recompile all the dependencies my project uses, e.g., NHibernate and every single external dependency that comes along ?
Note 1: The reason I asked this question is that I built a project with MonoDevelop on Ubuntu 9.10 and everything went like a charm but when I tried to debug running some tests written with NUnit everything just froze. I have to cancel the running test to get MonoDevelop back up and there is no clear stack trace or hint that I could use to find the problem. So I though that maybe I would need to compile NHibernate (and other dependencies) under Mono/Linux.
No, you don’t need to recompile DLLs that you reference in code compiled using the Mono compilers.
However, if your user executes the application under Mono rather than the Microsoft.NET framework and the DLL contains calls that aren’t supported by the Mono framework, they will run into problems.
There is a Mono migration tool that can analyze your DLLs to see whether they contain any calls that aren’t supported for users with Mono.
Likewise, DLLs compiled using the Mono compilers can be referenced by code that is compiled using the Microsoft compiler.