WIP: Move NativeBinaries to a NuGet package #772
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I poked around this weekend on moving the NativeBinaries to a NuGet package and had some limited success. This is definitely not ready for prime-time, but I think we're moving in the right direction.
My thinking here is that there will be two NuGet packages - one for LibGit2Sharp, one for LibGit2. The LibGit2Sharp NuGet package will depend on the LibGit2 package. The LibGit2Sharp project itself, for the developers, will depend only on the LibGit2 package.
This spike shows how this might be possible, but there are many disappointing aspects at the moment:
install.ps1
script. So the checked-in versions of theLibGit2Sharp.Tests.csproj
have the post-build copy stuff added to them. I had a bit of a hope that people without NuGet might be able to build successfully (and then provide their own NativeBinaries) instead of having the build fail for them. Maybe a.targets
will satisfy this, the whole.targets
thing is still a mystery to me.<references />
section is treated as if you did not include any references, so it tries to add references to the native libraries, which of course fails. Thus I have included aLibGit2Sharp.Dummy.dll
. I don't yet know how to get around this. Maybe using a CoApp package? Ugh.Anyway. This still needs a lot of work to get it into a mergeable state, unfortunately. But I wanted to push this up in case somebody else was able to assist.