2

Are mono libraries fully reference-able from MS.NET?

What about the inverse?

If "sorta", then which ones, and what are the limitations?

knocte
  • 16,941
  • 11
  • 79
  • 125
Alwyn
  • 8,079
  • 12
  • 59
  • 107
  • One dll compiled by mono compiler and other by MS compiler? It would be risky to do so. – Lukasz Madon Sep 11 '12 at 21:52
  • @knocte based on what? that mono doesn't have all features that .Net has? MS haven't released any compatibility tests (like Sun does for jvm), so behavior may be different etc. – Lukasz Madon Sep 11 '12 at 22:38
  • 1
    first question in the Mono FAQ: http://www.mono-project.com/FAQ:_General – knocte Sep 11 '12 at 22:58

2 Answers2

7

Yes, Mono compiler generates binaries which are compatible with the .NET framework and viceversa.

The only limitation AFAIK is managed C++:

  1. Mono compiler doesn't have a compiler for this.
  2. MS.NET compiler for this language generates mixed-mode assemblies that cannot be run in Mono.

(More info about managed C++ in this other stackoverflow question.)

Community
  • 1
  • 1
knocte
  • 16,941
  • 11
  • 79
  • 125
1

The file format is identical (for fully managed libraries, see answer from knocte), so in theory Mono libraries are fully reference-able from .NET (and vice versa).

In practice it depends on the content of the libraries. If you write Linux-only code in a library, it will of course not run on .NET. This is also the only potential issue, if you write platform independent code, you can use either Mono's mcs compiler or Microsoft's csc compiler and use the resulting library on either platform without problems.

Rolf Bjarne Kvinge
  • 19,253
  • 2
  • 42
  • 86