How Rebex has managed P/Invoke dependencies on Mono?

0 votes
asked Nov 7 by amitsinha (210 points)
edited Nov 30 by amitsinha
commented Nov 10 by amitsinha (210 points)
Will vs2008-net-2.0  will support Mono 4.8 also?

1 Answer

0 votes
answered Nov 8 by Lukas Pokorny (87,030 points)
selected Nov 12 by amitsinha
 
Best answer

You need to use the source code in vs2010-net-4.0 folder. It targets .NET 4.0, .NET 4.5.x, .NET 4.6.x, .NET 4.7 and Mono (3.0 or higher).

The vs2008-net-2.0 folder contains source code targeting .NET 2.0, .NET 3.0, .NET 3.5 and Mono 3.x (in .NET 2.0 mode).

The P/Invokes to Windows native libraries are only used when running on Windows.

As a side note, we are currently working on adding Mono support to .NET Standard 1.5 version of Rebex DLLs. This might be the preferred option because those DLLs are also going to support .NET Core (on Linux, Windows and macOS). If you would like rather use this, please contact us at support@rebex.net.

commented Nov 10 by amitsinha (210 points)
Will vs2008-net-2.0  will support Mono 4.8 also?
commented Nov 13 by Lukas Pokorny (87,030 points)
Mono 4.0 dropped support for .NET 2.0. Binaries compiled from 'vs2008-net-2.0' target .NET 2.0 and although they might still work on Mono 4.8, this is not a supported configuration.
commented Nov 13 by amitsinha (210 points)
But I have to compile code on .net 3.5 . I think your NET Standard 1.5 version of Rebex DLLs would be best one for this scenario. Right?
commented Nov 13 by Lukas Pokorny (87,030 points)
Assemblies targeting .NET Standard 1.5 require Mono 4.6 or .NET 4.6.1 (see the chart at https://docs.microsoft.com/en-us/dotnet/standard/net-standard). They would not work at all in previous versions.

Binaries compiled from 'vs2008-net-2.0' are suitable for .NET 2.0, 3.0 and 3.5 and Mono 3.x in .NET 2.0 mode. They might actually be usable on Mono 4.x, but this is not a supported configuration because Mono 4.x lacks .NET 2.0 mode.
...