libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

Exception when using it inside a Visual Studio 2022 Extensibility project

Open luislhg opened this issue 8 months ago • 6 comments

Hello, I'm unable to this this package within my Visual Studio 2022 extension.

Reproduction steps

  1. Create a new VisualStudio.Extensibiltiy Extension project (VS 2022)
  2. Add a reference to <PackageReference Include="LibGit2Sharp" Version="0.30.0"/>
  3. Add using (var repo = new Repository(repoDir)) to a command

Sample project: ExtensibilityNativeLibraries.zip

Expected behavior

To initialize the repo instance

Actual behavior

Exception The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. InnerException = {"Unable to load DLL 'git2-a418d9d' or one of its dependencies: Não foi possível encontrar o módulo especificado. (0x8007007E)"}

Version of LibGit2Sharp (release number or SHA1)

0.30.0

Operating system(s) tested; .NET runtime tested

Windows 11, .NET 8

luislhg avatar Jun 10 '24 16:06 luislhg