[Mono-list] I need a NuGet target for Mono

Daniel Hughes trampster at gmail.com
Thu Aug 4 05:19:07 UTC 2016


The answer to your question is that there isn't a separate target for
mono for windows/linux/osx.

All other .net libraries supported cross desktop platforms have
managed without one.

I would advise you against building two nuget packages one for mono
and one for .net. This will break any projects which use your
libraries cross platform. People should be able to download the source
and build it without having to manually switch out the nuget package
used based on the platform.

The Ninject library thought they needed a separate nuget package for
mono this broke our cross plaform project. We couldn't run on linux
without swapping out the .net package for the mono one. The reason
turned out to be because they used a undocumented internal API via
reflection (which wasn't available on mono because it was implemented
differently). All they needed to do was detect that was missing and
fall back to the documented API. And that's it. There new build has
fixed that thanks to 3 separate bug reports of people complaining they
tried to build projects (which referenced the .net nuget package) and
it crashed.

If you inflict this pain on users of your libraries they will
complain. You don't want to have to deal with that. Trust me.

Cheers,
Daniel Hughes

On Thu, Aug 4, 2016 at 1:42 AM, Tiago Freitas Leal
<tfreitasleal at gmail.com> wrote:
> Hi Edward,
>
> As I explained in a previous answer, the run the same DLL everywhere isn't
> as universal as it should, and not just because of OS differences, but also
> because there are differences in the way each platform implements the API.
> Yesterday's blog  .NET Standard Library Support for Xamarin
> <https://blog.xamarin.com/net-standard-library-support-for-xamarin/>   and
> Yesterday's update to Xamarin Studio to support it proves my point.
>
> Xamarin mobile platforms are driving this change (that's were the market is
> now) and non mobile Mono was left behind.
>
> I won't repeat myself, but I don't feel the need to have the same DLL
> running on Windows, Android or iOS. Neither does Microsoft/Xamarin/NuGet.
> That's why they introduced all the NuGet targets referred on my previous
> post.
>
> I know how to solve my problem and have different NuGet packages for .NET
> and Mono. What I'm looking for, is to have only one NuGet package that maps
> to a different DLL according to the VS project target.
>
>
>
> -----
> ---
> Tiago Freitas Leal
> --
> View this message in context: http://mono.1490590.n4.nabble.com/A-NuGet-target-for-Mono-is-needed-tp4668302p4668313.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/mono-list


More information about the Mono-list mailing list