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

ReadyRoll.MSBuild.4.4.22194.30982 Error in Azure Pipeline

We've been using the ReadyRoll Download Build Components task in our Azure Devops Pipeline for almost two years, but recently our builds are failing during the readyroll build process. It seems the issue is caused by the current version of ReadyRoll.MSBuild (ReadyRoll.MSBuild.4.4.22194.30982). The latest previous working version for us is ReadyRoll.MSBuild.4.4.22184.30843. For now I've adjusted my pipeline to use this version (22184), but I was hoping you could fix it for the latest going forward.  Here are the logs associated with failed build.

##[error].build\ReadyRoll.MSBuild.4.4.22194.30982\tools\SqlChangeAutomation.Data.Schema.Ssdt.targets(117,5): Error MSB4018: The "DBBuildTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
at RedGate.Versioning.Engine.Shared.Logging.Api.Configuration.LoggerConfigurationManager.GetLogLevel(IServiceIdentifier serviceIdentifier)
at RedGate.Versioning.Engine.Shared.Logging.Serilog.SerilogLoggerConfiguration..ctor(IServiceIdentifier serviceId, ILoggerConfigurationManager configurationManager)
at RedGate.Versioning.Engine.Shared.Logging.Serilog.SerilogLoggerConfiguration..ctor(IServiceIdentifier serviceId)
at RedGate.Versioning.Client.MsBuild.MsBuildModule.Load(ContainerBuilder builder)
at Autofac.Module.Configure(IComponentRegistry componentRegistry)
at Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean excludeDefaultModules)
at Autofac.ContainerBuilder.UpdateRegistry(IComponentRegistry componentRegistry)
at Autofac.Core.Lifetime.LifetimeScope.CreateScopeRestrictedRegistry(Object tag, Action`1 configurationAction)
at Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Object tag, Action`1 configurationAction)
at Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Action`1 configurationAction)
at Autofac.Core.Container.BeginLifetimeScope(Action`1 configurationAction)
at RedGate.Versioning.Client.MsBuild.SqlChangeAutomationTask`2.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Answers

  • Options
    clinkeclinke Posts: 18 Bronze 1
    We have the same problem here but on local deployment in VS. Any news?
  • Options
    Hi @CalinK

    Sorry to hear you're experiencing this issue!
     
    The long term fix would be to move to using the latest SQL Change Automation PowerShell tasks as ReadyRoll is no longer supported
     
    https://documentation.red-gate.com/sca/deploying-database-changes/add-ons/azure-devops
     
    If you wish to workaround this until you can make the transition, you will need to lockdown to the following version:
     

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • Options
    Hi @clinke

    To deploy locally you can use the PowerShell modules which doesn't require Visual Studio
     
    https://documentation.red-gate.com/sca/reference/powershell-cmdlets

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • Options
    ebezoldebezold Posts: 4 New member
    edited August 5, 2022 5:26PM
    Hello, we are facing the same issue since the last update.

    In our case, we perform the build on a "on premises" agent.
    The agent has version 19.7 and shows "Advanced Installer is up to date" in the About Box.

    Our DB projects build successfully on local machines, but when we send the build to our Agent it fails with the same error log:

    <div><div><span style="background-color: transparent; color: inherit; font-size: inherit; font-family: Roboto, "Helvetica Neue", Arial, sans-serif;">System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.</span><br></div></div><div><div>File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'</div></div>

    What would be solution in this case?
    Thanks in advance
  • Options
    ebezoldebezold Posts: 4 New member
    edited July 22, 2022 8:01PM
    Hello,
    We are facing the same issue. Exact same error as the original post.

    In our case, we have a OnPremises build agent, which is part of our Azure Pipelines.
    Our pipeline downloads the artifacts and performs the build of the project. As AI is installed on the Agent machine, we are not using specific tasks other than "Visual Studio Build", AI is installed on the machine, so we expect that it runs without problems, like a local build.

    Our AI version is 19.7 and it is installed and updated on the server. Before updates, it was running fine.

    Error log:

    [error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\SqlChangeAutomation\SqlChangeAutomation.Data.Schema.Ssdt.targets(117,5): Error MSB4018: The "DBBuildTask" task failed unexpectedly.
    System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
    File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'   at RedGate.Versioning.Engine.Shared.Logging.Serilog.SerilogLoggerConfiguration..ctor(IServiceIdentifier serviceId)
       at RedGate.Versioning.Client.MsBuild.MsBuildModule.Load(ContainerBuilder builder)
       at Autofac.Module.Configure(IComponentRegistry componentRegistry)
       at Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean excludeDefaultModules)
       at Autofac.ContainerBuilder.UpdateRegistry(IComponentRegistry componentRegistry)
       at Autofac.Core.Lifetime.LifetimeScope.CreateScopeRestrictedRegistry(Object tag, Action`1 configurationAction)
       at Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Object tag, Action`1 configurationAction)
       at Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Action`1 configurationAction)
       at Autofac.Core.Container.BeginLifetimeScope(Action`1 configurationAction)
       at RedGate.Versioning.Client.MsBuild.SqlChangeAutomationTask`2.Execute()
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

  • Options
    IzzyIzzy Posts: 2 New member
    Hi @DanC
    If ReadyRoll is no longer supported, why there are still new updates for the extension? What are the updates for?
    SQL Change Automation Visual Studio 4.4 release notes - SQL Change Automation 4 - Product Documentation (red-gate.com)
  • Options
    Izzy said:
    Hi @DanC
    If ReadyRoll is no longer supported, why there are still new updates for the extension? What are the updates for?
    SQL Change Automation Visual Studio 4.4 release notes - SQL Change Automation 4 - Product Documentation (red-gate.com)
    Hi Izzy,

    This is for the development side of SQL Change Automation in Visual Studio, the difference being we no longer support doing a deployment within VS and advise using the SCA add-ons for the various CI/CD tools or the PowerShell cmdlets

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • Options
    ebezold said:
    Hello,
    We are facing the same issue. Exact same error as the original post.

    In our case, we have a OnPremises build agent, which is part of our Azure Pipelines.
    Our pipeline downloads the artifacts and performs the build of the project. As AI is installed on the Agent machine, we are not using specific tasks other than "Visual Studio Build", AI is installed on the machine, so we expect that it runs without problems, like a local build.

    Our AI version is 19.7 and it is installed and updated on the server. Before updates, it was running fine.

    Error log:

    [error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\SqlChangeAutomation\SqlChangeAutomation.Data.Schema.Ssdt.targets(117,5): Error MSB4018: The "DBBuildTask" task failed unexpectedly.
    System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
    File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'   at RedGate.Versioning.Engine.Shared.Logging.Serilog.SerilogLoggerConfiguration..ctor(IServiceIdentifier serviceId)
       at RedGate.Versioning.Client.MsBuild.MsBuildModule.Load(ContainerBuilder builder)
       at Autofac.Module.Configure(IComponentRegistry componentRegistry)
       at Autofac.ContainerBuilder.Build(IComponentRegistry componentRegistry, Boolean excludeDefaultModules)
       at Autofac.ContainerBuilder.UpdateRegistry(IComponentRegistry componentRegistry)
       at Autofac.Core.Lifetime.LifetimeScope.CreateScopeRestrictedRegistry(Object tag, Action`1 configurationAction)
       at Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Object tag, Action`1 configurationAction)
       at Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Action`1 configurationAction)
       at Autofac.Core.Container.BeginLifetimeScope(Action`1 configurationAction)
       at RedGate.Versioning.Client.MsBuild.SqlChangeAutomationTask`2.Execute()
       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
       at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

    Hi, 

    In order to resolve the issue you will need to replace the Visual Studio build task like the example here:



    Instead, you will use the SQL Change Automation Build Task as shown here:



    Documentation on this task can be found here: https://documentation.red-gate.com/sca/deploying-database-changes/add-ons/azure-devops/use-the-azure-devops-build-extension-with-sql-change-automation-project


    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • Options
    clinkeclinke Posts: 18 Bronze 1
    Is it so hard to add the missing dependency again? Then everything would work as before. I understand if there is some functionality broken, but this is only a dependency?
  • Options
    IzzyIzzy Posts: 2 New member
    Hi @DanC
    If ReadyRoll is no longer supported, why there are still new updates for the extension? What are the updates for?
    SQL Change Automation Visual Studio 4.4 release notes - SQL Change Automation 4 - Product Documentation (red-gate.com)
  • Options
    ebezoldebezold Posts: 4 New member
    edited August 5, 2022 5:34PM
    DanC said:
    ebezold said:
    Hello,
    We are facing the same issue. Exact same error as the original post.

    In our case, we have a OnPremises build agent, which is part of our Azure Pipelines.
    Our pipeline downloads the artifacts and performs the build of the project. As AI is installed on the Agent machine, we are not using specific tasks other than "Visual Studio Build", AI is installed on the machine, so we expect that it runs without problems, like a local build.

    Our AI version is 19.7 and it is installed and updated on the server. Before updates, it was running fine.


    Hi, 

    In order to resolve the issue you will need to replace the Visual Studio build task like the example here:



    Instead, you will use the SQL Change Automation Build Task as shown here:



    Documentation on this task can be found here: https://documentation.red-gate.com/sca/deploying-database-changes/add-ons/azure-devops/use-the-azure-devops-build-extension-with-sql-change-automation-project


    But it requires an Output Nuget pkg ID



Sign In or Register to comment.