Skip to content

GitVersion crashes on Ubuntu 18.04 with System.BadImageFormatException: Method has no body #1483

@alexeyzimarev

Description

@alexeyzimarev

My build script runs fine in Docker mono image, but when I try to build on my machine, I get this error:

 ✘  ~/dev/infra/email   master ●  mono packages/tools/GitVersion.CommandLine/tools/GitVersion.exe 
INFO [09/27/18 11:39:09:75] Working directory: /home/alexey/dev/infra/email
INFO [09/27/18 11:39:09:76] IsDynamicGitRepository: False
ERROR [09/27/18 11:39:09:77] An unexpected error occurred:
System.BadImageFormatException: Method has no body
File name: 'LibGit2Sharp'
  at LibGit2Sharp.Core.Proxy.git_buf_free (LibGit2Sharp.Core.Handles.GitBuf buf) [0x00000] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Handles.GitBuf.Dispose () [0x00000] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Proxy.ConvertPath (System.Func`2[T,TResult] pathRetriever) [0x0002e] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Core.Proxy.git_repository_discover (LibGit2Sharp.Core.FilePath start_path) [0x00005] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at LibGit2Sharp.Repository.Discover (System.String startingPath) [0x00006] in <8cb98e2882834fdfae1774f5509e9705>:0 
  at GitVersion.GitPreparer.GetDotGitDirectory () [0x0000f] in <d3d987301fcb4b25b3d107f5a758a97d>:0 
  at GitVersion.GitPreparer.GetProjectRootDirectory () [0x00048] in <d3d987301fcb4b25b3d107f5a758a97d>:0 
  at GitVersion.ConfigurationProvider.Verify (GitVersion.GitPreparer gitPreparer, GitVersion.Helpers.IFileSystem fileSystem) [0x00014] in <d3d987301fcb4b25b3d107f5a758a97d>:0 
  at GitVersion.Program.VerifyConfiguration (GitVersion.Arguments arguments, GitVersion.Helpers.IFileSystem fileSystem) [0x00023] in <d3d987301fcb4b25b3d107f5a758a97d>:0 
  at GitVersion.Program.VerifyArgumentsAndRun () [0x00118] in <d3d987301fcb4b25b3d107f5a758a97d>:0 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions