What are the challenges you face when working across database platforms? Take the survey

Getting error after adding a migration script

Hi Team,
I am using SQL Source Control 5 to link my database with TFVC.
I did a fresh build after linking the database, it was successful. Then I renamed a table and added a migration script and committed to source control. After this the build is failing with below error. Kindly suggest any solution for the same.

[error]SQLCompare.exe terminated with the exit code 255.
[error]SQLCompare.exe produced this error output:
[error]Error: Comparison of 'Scripts.PlugIn' and 'np:\\.\pipe\LOCALDB#B2CCC787\tsql\query.dlmautomation_16dd6cdd-77af-4d71-93f4-038780ac92a3' failed: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
[error]Unhandled Exception: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'git2-a5cf255': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
[error] at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
[error] at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject..ctor()
[error] at LibGit2Sharp.Core.NativeMethods..cctor()
[error] --- End of inner exception stack trace ---
[error] at LibGit2Sharp.Core.NativeMethods.RemoveHandle()
[error] at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject.Finalize()
[error]Unable to upload artifact from:D:\cccharv\agent1\_work\29\s\PlugIn.20171011.9.nupkg

Finishing task: RedgateDlmAutomationBuild


Best Answer


  • Options
    It would appear there's a problem with your DLM Automation installation on the build agent. It's complaining that it doesn't have permission to access a particular DLL. The DLL in question, 'git2-a5cf255.dll', should exist in 'C:\Program Files (x86)\DLM Automation 2\SC\lib\Win32\x86' on the agent, and the user account that the build agent runs as needs to have access to that file.
    Development Lead
    Redgate Software
  • Options
    Hi Mike,
    I am using DLM Automation 1 as of now. On the build agent "git2-a5cf255.dll" is not present where you mentioned but it is present inside agent/task folder. The user account has access to that file as well.
Sign In or Register to comment.