Re: RFC; [PATCH] Add ikvm.props to the NuGet Package to Copy Native Binaries

Jeroen Frijters <[email protected]> Mon, 31 Aug 2015 14:42:59 +0000
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <[email protected]>
Hi Christopher,

Thanks for looking into this. Would it be an idea to split the nuget package into a pure-managed and a native package? That way the majority of users that don't need to native code won't get the native libaries. It should be possible to move IKVM.Runtime.JNI.dll into the native package as well.

Thanks,
Jeroen

> -----Original Message-----
> From: Christopher Boumenot [mailto:[email protected]]
> Sent: Monday, August 31, 2015 8:25
> To: [email protected]
> Subject: [Ikvm-developers] RFC; [PATCH] Add ikvm.props to the NuGet
> Package to Copy Native Binaries
> 
> I am developing a project that uses IKVM that has to access native
> binaries.  In my project I reference ikvm-native-win32-x64.dll and
> JVM.dll in my project, but I am trying to figure out how to make this
> easier when I ship my project as a NuGet package to end-users.  I would
> prefer if end users just install the NuGet package, and the binaries end
> up in the build output directory.  This is not true for IKVM (in the
> case of these binaries), and instead I need to rely on the end user
> referencing the ikvm-native-win32-x64.dll and JVM.dll or putting it in
> their load path.  One solution that I have seen (from
> libgit2sharp.nativebinaries) is to create a props files that copies the
> native binaries to the build output directory.  This provides a well-
> defined location for my project to load these necessary binaries without
> the user having to take action.  This also makes it easier to consume my
> project in LINQPad without having to manually call out binaries.
> 
> Is there a preferred solution to this problem or any ideas on how to
> best solve it?  I have attached a patch that implements the props
> solution.  Any feedback is appreciated.
> 
> 
> 
> Thanks,
> Christopher
------------------------------------------------------------------------------