Alwyn
Alwyn

Reputation: 8337

Mono and .NET dll interchangeability

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

What about the inverse?

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

Upvotes: 2

Views: 1866

Answers (2)

Rolf Bjarne Kvinge
Rolf Bjarne Kvinge

Reputation: 19335

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.

Upvotes: 1

knocte
knocte

Reputation: 17939

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.)

Upvotes: 7

Related Questions