libgit2 / libgit2sharp.nativebinaries

MIT License
28 stars 62 forks source link

LibGit2Sharp.NativeBinaries and LibGit2Sharp #153

Closed rozeboosje closed 9 months ago

rozeboosje commented 9 months ago

Ladies and gents,

If you're going to issue a new version of LibGit2Sharp.NativeBinaries to NuGet, can you please issue a corresponding release of LibGit2Sharp? It's pretty pointless to get build 2.0.321 of the Native Binaries only to find that LibGit2Sharp 0.28.0 can't use it.

.NET Project for .NET Framework 4.8

bording commented 9 months ago

We have to release it first, there's no way to do that otherwise.

However, you should never be directly referencing LibGit2Sharp.NativeBinaries directly, so this should not be a problem.

If you're still using packages.config, well you should be using package references these days.

rozeboosje commented 9 months ago

Thanks @bording

Okay... I removed our reference to NuGet package LibGit2Sharp.NativeBinaries

I checked the build output and I see LibGit2Sharp.NativeBinaries is no longer included in the bin folder

Our packages are included as PackageReferences - at least in the one project in which we used LibGit2Sharp

It all seems to work fine now. So maybe I should just shrug and go "alright then". But I'm curious though. When I look at NuGet I see under Dependencies that LibGit2Sharp is dependent on LibGit2Sharp.NativeBinaries build 2.0.320, and I confirmed by stepping through the code that we are still executing code that uses LibGit2Sharp

If the dependency DLL LibGit2Sharp.NativeBinaries is not present in the output, how is it possible that the code that uses LibGit2Sharp still works fine? Mind you, I'm not complaining, but I'm confused....

bording commented 9 months ago

I checked the build output and I see LibGit2Sharp.NativeBinaries is no longer included in the bin folder

What exactly are you looking for/expecting to see when you looked at the build output here?

For a .NET Framework project, the NativeBinaries package should be resulting in a lib folder being copied into the bin folder of the project.

rozeboosje commented 9 months ago

Yup that does the job.

rozeboosje commented 9 months ago

Thanks @bording - yes I hadn't accounted for that lib folder that includes a git2_.....dll

Also, today there was a new NuGet package for LibGit2Sharp - 0.29.0 - and after I figured out that CloneOptions.CredentialsProvider was now in CloneOptions.FetchOptions.CredentialsProvider everything built and runs successfully. Cheers.

rozeboosje commented 9 months ago

Thanks again