Skip to content
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

Copy native libs using package build targets #50

Closed
wants to merge 1 commit into from
Closed

Copy native libs using package build targets #50

wants to merge 1 commit into from

Conversation

gillima
Copy link
Contributor

@gillima gillima commented Jan 31, 2016

Using a simple MSBuild target, the native lib's can be copied to the output directory without adding them to each project as content.

@leupibr
Copy link

leupibr commented Feb 1, 2016

+1

@metadings
Copy link
Member

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.)

@metadings metadings closed this Feb 1, 2016
@gillima
Copy link
Contributor Author

gillima commented Feb 1, 2016

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.

@metadings
Copy link
Member

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.

@Limro
Copy link

Limro commented Feb 3, 2016

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants