libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

Natives libraries are not disposed

Open DomZZ opened this issue 5 years ago • 1 comments

I'm using libGitSharp under IIS pool, when IIS pool is off I can compile my VS solution without any problems, but it I want to recompile the web site when the pool process is up, I always get an error with git2-106a5f2.dll assembly that is loaded and never disposed. All my libgitsharp code is around a USING statement.

Reproduction steps

Create a web project, code something with libgitsharp, run it, try to recompile the project

Expected behavior

I should be able to recompile my project without errors

Actual behavior

I get following error : 3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4943,5): warning MSB3061: Unable to delete file "....\bin\lib\win32\x64\git2-106a5f2.dll". Access to the path '...\bin\lib\win32\x64\git2-106a5f2.dll' is denied.

Version of LibGit2Sharp (release number or SHA1)

LibGitSharp 0.26.2

Operating system(s) tested; .NET runtime tested

Windows 10 2004, .NET 4.6.2

DomZZ avatar Oct 21 '20 07:10 DomZZ

We're seeing a similar issue preventing deployments to IIS even after stopping the site because git2- 106a5f2.dll is in use by IIS. Windows does not allow us to delete the file. On Windows server 2019 standard, libgit2sharp version 0.26.2

blackboxlogic avatar Jul 12 '22 14:07 blackboxlogic