I had vague recollections that there were some ifdefs in the managed code
which made it platform specific, but I could be wrong or they could just be
gone nowadays. Jonp probably knows best ;)
Either way, if you deploy it without the matching native lib you can hit
crashes, so the simplest option all round is to just rely on the system
one, if at all possible :)
Alan
On 30 March 2016 at 13:06, Chris Swiedler <cswiedler at trionworlds.com> wrote:
> To Alan's point, we did see crashes when we (unintentionally) deployed
> Mono.Posix.dll along with our app. Our solution was, like he said, to Not
> Do That, and use our Mono.Posix as a compile-time library only.
>> I do think it's much easier to do it this way than to have different
> compile targets, which (if I'm understanding correctly) is what the other
> suggestions all require.
>> chris
>> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com [mailto:
>mono-devel-list-bounces at lists.ximian.com] On Behalf Of Jonathan Pryor
> Sent: Wednesday, March 30, 2016 7:04 AM
> To: Alan McGovern <alan.mcgovern at gmail.com>
> Cc: mono-devel-list <mono-devel-list at lists.ximian.com>
> Subject: Re: [Mono-dev] Cross Platform on Linux/Windows with Mono.Posix
> reference on Linux
>> On Mar 30, 2016, at 8:33 AM, Alan <alan.mcgovern at gmail.com> wrote:
> > If you package Mono.Posix.dll your app *will crash* on different systems.
>> Not necessarily.
>> > This binary is platform specific and is not safe to copy between OS’s.
>> Mono.Posix.dll *itself* contains no platform-specific code and is
> perfectly safe to copy between operating systems.
>> Mono.Posix.dll contains P/Invokes into “MonoPosixHelper”
> (libMonoPosixHelper.dylib on OS X, MonoPosixHelper.dll on Windows, etc.),
> and MonoPosixHelper contains operating system-specific code. It *cannot* be
> copied between operating systems; it’s a native library.
>> > It's fine to have a copy of Mono.Posix.dll used purely for compilation
> purposes. But at runtime you have to use the system provided one, which
> typically means the one provided by the system's mono installation.
>> It’s entirely fine to include Mono.Posix.dll with your app, SO LONG AS you
> *also* copy and distribute MonoPosixHelper with your app.
>> Additionally, Mono.Posix.dll also P/Invokes other native libraries such as
> INTL.DLL (Mono.Unix.Catalog) and MSVCRT.DLL (Mono.Unix.Native.Stdlib),
> which should be usable on Windows (so long as you also distribute INTL.DLL,
> etc.).
>> - Jon
>> _______________________________________________
> Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com>http://lists.ximian.com/mailman/listinfo/mono-devel-list>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20160330/8f2c31ba/attachment.html>