Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Mercurial extension no longer working after 4.7.1 upgrade



  • The Mercurial 4.4 extension does not load correctly with BuildMaster 4.7.1. The following error is reported on the extensions screen:

    Could not load type 'Inedo.BuildMaster.Extensibility.Providers.SourceControl.IMultipleRepositoryProvider1' from assembly 'BuildMasterCore, Version=4.7.1.12, Culture=neutral, PublicKeyToken=112cfb71329714a6'.`

    This leads to the following stack traces in the logs when automated builds attempt to trigger:

    SCM-Triggered Automatic Build "Generic - Monitor" (#17) in application "XXXX" using "BitBucket" provider: Error getting SCM state: System.AggregateException: One or more errors occurred. ---> System.ArgumentException: Assembly Mercurial was not found. The extension may be out of date, have been deleted, or could not be loaded.
    Parameter name: assemblyName ---> System.IO.FileNotFoundException: Could not load file or assembly 'Mercurial' or one of its dependencies. The system cannot find the file specified.
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
    at Inedo.BuildMaster.Util.Persistence.CreateInstance(String assemblyName, String typeName)
    --- End of inner exception stack trace ---
    at Inedo.BuildMaster.Util.Persistence.CreateInstance(String assemblyName, String typeName)
    at Inedo.BuildMaster.Util.Persistence.DeserializeFromXElement(XElement objElement)
    at Inedo.BuildMaster.Util.Persistence.DeserializeFromPersistedObjectXml(String objXml)
    at Inedo.BuildMaster.Util.Providers.CreateProviderFromId[TProviderBase](Int32 providerId, AgentBase agent, Boolean disposeAgent)
    at Inedo.BuildMaster.Windows.ServiceApplication.ScmTriggerExecuter.GetScmState(BuildSchedules_Extended schedule)
    at System.Threading.Tasks.Task`1.InnerInvoke()
    at System.Threading.Tasks.Task.Execute()
    --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
    at Inedo.BuildMaster.Windows.ServiceApplication.ScmTriggerExecuter.GetCurrentState(BuildSchedules_Extended build, Providers provider)
    at Inedo.BuildMaster.Windows.ServiceApplication.ScmTriggerExecuter.RunTriggeredBuild(BuildSchedules_Extended build, Providers provider)
    ---> (Inner Exception #0) System.ArgumentException: Assembly Mercurial was not found. The extension may be out of date, have been deleted, or could not be loaded.
    Parameter name: assemblyName ---> System.IO.FileNotFoundException: Could not load file or assembly 'Mercurial' or one of its dependencies. The system cannot find the file specified.
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
    at Inedo.BuildMaster.Util.Persistence.CreateInstance(String assemblyName, String typeName)
    --- End of inner exception stack trace ---
    at Inedo.BuildMaster.Util.Persistence.CreateInstance(String assemblyName, String typeName)
    at Inedo.BuildMaster.Util.Persistence.DeserializeFromXElement(XElement objElement)
    at Inedo.BuildMaster.Util.Persistence.DeserializeFromPersistedObjectXml(String objXml)
    at Inedo.BuildMaster.Util.Providers.CreateProviderFromId[TProviderBase](Int32 providerId, AgentBase agent, Boolean disposeAgent)
    at Inedo.BuildMaster.Windows.ServiceApplication.ScmTriggerExecuter.GetScmState(BuildSchedules_Extended schedule)
    at System.Threading.Tasks.Task`1.InnerInvoke()
    at System.Threading.Tasks.Task.Execute()<---
    

    Deleting and re-installing the application has no effect. Manually rolling back the mercurial extension to 4.3 shows the same exception.

    Product: BuildMaster
    Version: 4.7.1



  • Can you download Mercurial v4.5? That should include the relevant changes to work with BuildMaster v4.7.1



  • Updated the mercurial plug-in and it now loads correctly. We now have different bugs:

    • Existing automatic builds no longer work
    • Editing an existing automatic build and clicking "..." next to "Source path to monitor" crashes the server. The app pool repeatedly dies and sends the server into a 503 unavailable until it is manually restarted. There is no stack trace for this recorded in the Event Log but I may have crash dumps if you need them.

    Deleting the Automated build and recreating it works fine - it's just a lot of grunt work. It seems we also need to go through and add names to all of our Mercurial repositories and update all references to them in our build scripts? Has this been a recent change?



  • In theory, you shouldn't need to add a name unless there are multiple repositories for a single provider - if that's not working as you would expect then that is a bug. All of our test repos for multi-repo providers have a name, but it still seems to work without one. If it's easy enough to add a name as a workaround, that's the best bet, and we can update the provider again in the meantime as to not require it as before.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation