libgit2sharp
libgit2sharp copied to clipboard
Exception when using it inside a Visual Studio 2022 Extensibility project
Hello, I'm unable to this this package within my Visual Studio 2022 extension.
Reproduction steps
- Create a new VisualStudio.Extensibiltiy Extension project (VS 2022)
- Add a reference to
<PackageReference Include="LibGit2Sharp" Version="0.30.0"/>
- 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