Skip to content
Advertisement

Using mono assemblies from the .NET CoreCLR

I need to consume a library that doesn’t yet have CoreCLR support (RabbitMQ.Client, to be specific). Is it possible to utilize a mono-based port of that library on a Linux system from inside a CoreCLR executable? If so, how is that achieved?

Advertisement

Answer

It is impossible at binary level (unless using a proper PCL profile). .NET Core has a different approach to arrange classes in assemblies, so some assemblies on desktop .NET Framework are broken into smaller assemblies, and types are moved. A desktop targeting assembly (from .NET or Mono) won’t work on .NET Core due to such changes.

But it is obviously possible at source code level, as there was an attempt to port Mono’s WinForms to .NET Core,

http://forums.dotnetfoundation.org/t/anyone-porting-winforms-mono-to-net-core/898/4

Once a new .NET Core library project is created, the source files should be able to be carried over (with some modification or even none).

However, .NET Core has been evolving too fast, and that attempt might be now out of date. Anyone would like to explore in this area can follow that example and try once again. Good luck.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement