libgit2 / libgit2sharp.nativebinaries

MIT License
29 stars 63 forks source link

How to build custom libgit2sharp native libraries package #113

Closed ydanila closed 3 years ago

ydanila commented 3 years ago

I am trying to create custom version of libgit2sharp with SSH support using source from official repo https://github.com/libgit2/libgit2sharp

I built NuGet package which contains libgit2 with enabled SSH support from this repo https://github.com/julesbovet/libgit2sharp-ssh.nativebinaries

But after I replaced link to original LibGit2Sharp.NativeBinaries package with my LibGit2Sharp-SSH.NativeBinaries package it always fails to build with error

Error MSB4184 The expression """.Substring(0, 7)" cannot be evaluated. Index and length must refer to a location within the string. Parameter name: length LibGit2Sharp C:\test\libgit2sharp\Targets\CodeGenerator.targets 44

$libgit2_hash variable value always empty at this line

How and where msbuild initializes this value ? What I need to changes to build right NuGet package?

bording commented 3 years ago

The fork of the native binaries package you're trying to use is outdated and doesn't have any of the recent changes this repo has made and LibGit2Sharp expects.