问题
I'm trying to create a nuget package for UWP targeting separate CPU architecture builds (arm, x64, x86). I'm using nuget 3.3.0. Reading latest nuget documentation, I understood that this can be achieved using "runtimes" folders.
This is package structure:
Installing the package to a UWP project adds the dependencies but it doesn't add references for assemblies from lib folders as a result I can't use the content. There are no errors packing or installing the package.
Searching on internet I found other ways to pack CPU architecture specific builds (most relevant ones: 1, 2). All of them seems to target old nuget versions (<3.0.0).
Are "runtimes" the right way to solve this problem with latest nuget version? If yes what am I doing wrong?
回答1:
See https://github.com/NuGet/Home/issues/1221.
In summary, you'll have to place your architecture specific binaries in the runtimes
folder.
In addition you need a surface area implementation to be placed in the ref
folder.
The trick is to use the corflags
command to generate the library for your ref
folder.
来源:https://stackoverflow.com/questions/35491904/how-to-use-nuget-runtimes-to-target-different-cpu-architectures-in-the-same-pack