ReadyRoll.MSBuild.4.4.22194.30982 Error in Azure Pipeline
CalinK
Posts: 2 Bronze 1
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()
Tagged:
Answers
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?
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?
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:
What would be solution in this case?
Thanks in advance
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)
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?
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?
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)