libgit2 / libgit2/libgit2sharp
Exception when using it inside a Visual Studio 2022 Extensibility project
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by opening ExtensibilityNativeLibraries.zip and reproducing the PackageReference setup in a Visual Studio 2022 extensibility project on Windows 11 with .NET 8. Trace the NativeMethods initialization when new Repository(repoDir) runs; done means the repository initializes without the reported native DLL exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100