-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for native dependencies #714
Comments
Conditions:
Given that a fallback mode (building from source) is likely popular, we want to make it easy to ensure that only 1 reference from a conditional set is chosen. We should probably group them within another element or provide an id that prevents duplicates. |
Target strings need to be as generic as can be permitted based on their restrictions. / - root is AnyCPU pointer size, architecutre, and endianess are combined into the first string. Pointer size and endianess are only included if the architecture string doesn't make them redundant. I.e, we would see /ARM-little/ and /ARM-big/, but not /x86-little/. |
The approach is quite similar to the ref/lib/rid approach of NuGet 3 packages and runtime.json file. See this link - http://docs.nuget.org/Create/uwp-create. We are in a process of thinking about a gen2 of this layout and hope to share the idea not that long out once we put some more time into it. |
Is there a list of RIDs?
Could this be documented prior to implementation, so there can be community feedback stage? The current design doesn't seem to take many of the points above into account. |
RIDs are defined by the following nuget package - https://www.nuget.org/packages/Microsoft.NETCore.Platforms And you can define your own as well. |
Yes |
I think it would be good for Paket to look at the In this example:
|
we now have basic support for native dependencies |
Is there any documentation on how to build NuGet packages to support native dependencies? |
A lot has been written about this (challenging) topic; so I'll link to what I've found (and please add more links in the comments).
I've been using a https download-during-boot approach for ImageResizer, but that is slow, unreliable, and annoying. I tried to create an example of how to build the ideal native/managed hybrid project, failed, then started a project to try to hot-fix the problem at runtime, and hit another series of roadblocks.
I've identified a few invalid assumptions that seem responsible for the current state of things.
Some of these are somewhat comical considering how easy it is to parse binaries for the major platforms and determine runtime compatibility.
Removing these assumptions, what new requirements are we left with?
a) We need to gather the referenced files (nuget references, mind you), and verify that the output folder does not have any conflicting named files. If there are conflicting names, the output folder version MUST be deleted, so that we can AssemblyResolve or LoadLibrary the correct version. We then copy each of the files to an appropriate subfolder of the output folder (or, if AnyCPU, the output folder itself). Since VisualStudio is blind to compatibility (by choice, one must assume), we may end up fighting with the build process a bit. Perhaps disabling copylocal? Another nice sanity check would be to simply parse the binary headers of everything in the output folder and ensure they are all able to run on a common environment.
So, I guess
The text was updated successfully, but these errors were encountered: