The Cake add-on "Cake.Git" running on Linux does not work due to a downstream bug in lib2git.
Error: One or more errors occurred.
The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: lib/linux/x86_64/libgit2-1196807.so
It works as intended on Windows / macOS.
Update: LibGit2Sharp
does not play well with Debian, which is the base image used for FROM microsoft/dotnet:2.1-sdk
. Switching to Ubuntu as a base image makes it build fine : OK build