Replies: 1 comment
-
|
Since I saw no update for 2 weeks and since I tried looking to how other packages do it and couldn't find anything I figured it can't be done currently, so I changed this from Q&A to Idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm struggling with this for some time now: I have a nuget that needs to run native code, different binary for each OS (I support Windows, OSX, Linux-X64, Linux-Arm64 and Linux-Alpine).
I currently deploy all the binaries bundled in the same nuget, but since each binary is big (~80-90MB) I want to separate the binaries to sub-nugets, but I don't want the end-users to be affected by this change, so they can still refer to "MyNuget". In order for it to be effective I want it to only restore the relevant sub-nuget according to the OS.
I tried adding conditionals to the
ProjectReferences but when I publish the nugets the conditionals are removed and I left with the platform I built on.I also tried creating
.nuspecmanually but could't figure out the correct way to set conditonals, and the same goes for.targetsfile.I thought this was since I remembered seeing projects which do this but after looking more deeply I figured all those projects asks the user to install the native packages mannually in addition. I know it's possible if building from source, so with a little work on NuGet's side it should be also possible to do even when restoring a package.
To sum up, the structure I'm trying to achieve:
I want to be able to publish the first 3 layers as nugets and let the user (layer 4) only add PackageRefernce to MyNuget (layer 3) and it'll use the core-selector (layer 2) to restore automatically the correct core (layer 1) according to the OS the user is building on.
Beta Was this translation helpful? Give feedback.
All reactions