Closed gillima closed 8 years ago
+1
Sorry, your change to the nuspec file will break the package.
Nuget does add all .dll
within the lib
folder into the project references, which should not be the case for native libraries. This is why I'm used to do them into the content
folder. (nuget entirely breaks the installation, does a rollback and shows up with an exception.)
I've tested it with VS2013 without problems. NuGet seems only to add automatically when no reference is specified, but here the ZeroMQ.dll
is specified...
As you can see when you check the current package, .dlls
are already in the lib
folder because the files are recursively added by <file src="\bin\Release\**\*.*" target="lib\net40\" />
:
$ find
.
./repositories.config
./ZeroMQ.4.1.0.17
./ZeroMQ.4.1.0.17/content
./ZeroMQ.4.1.0.17/content/amd64
./ZeroMQ.4.1.0.17/content/amd64/libsodium.dll
./ZeroMQ.4.1.0.17/content/amd64/libsodium.so
./ZeroMQ.4.1.0.17/content/amd64/libzmq.dll
./ZeroMQ.4.1.0.17/content/amd64/libzmq.so
./ZeroMQ.4.1.0.17/content/i386
./ZeroMQ.4.1.0.17/content/i386/libsodium.dll
./ZeroMQ.4.1.0.17/content/i386/libsodium.so
./ZeroMQ.4.1.0.17/content/i386/libzmq.dll
./ZeroMQ.4.1.0.17/content/i386/libzmq.so
./ZeroMQ.4.1.0.17/lib
./ZeroMQ.4.1.0.17/lib/net40
./ZeroMQ.4.1.0.17/lib/net40/amd64
./ZeroMQ.4.1.0.17/lib/net40/amd64/libsodium.dll
./ZeroMQ.4.1.0.17/lib/net40/amd64/libsodium.so
./ZeroMQ.4.1.0.17/lib/net40/amd64/libzmq.dll
./ZeroMQ.4.1.0.17/lib/net40/amd64/libzmq.so
./ZeroMQ.4.1.0.17/lib/net40/i386
./ZeroMQ.4.1.0.17/lib/net40/i386/libsodium.dll
./ZeroMQ.4.1.0.17/lib/net40/i386/libsodium.so
./ZeroMQ.4.1.0.17/lib/net40/i386/libzmq.dll
./ZeroMQ.4.1.0.17/lib/net40/i386/libzmq.so
./ZeroMQ.4.1.0.17/lib/net40/ZeroMQ.dll
./ZeroMQ.4.1.0.17/ZeroMQ.4.1.0.17.nupkg
If it's not working on your machine, it's also possible to do the same using the tools
directory instead of the lib
.
I don't really know - what I know is that it doesn't work as expected if there are changes to this file.
Look: I don't really care about problems using nuget. It's nice to have, but not a requirement. This also means that this program should work without it. So please, you may add a MSBuild target file, but it shouldn't expect this being a nuget package, or otherwise said, it should also work without nuget.
@gillima I would like to give you a hand getting this working on NuGet. The latest version in there is from August anyways, so an update should be added :) I will take a look at it when I get home.
Using a simple MSBuild target, the native lib's can be copied to the output directory without adding them to each project as content.