Unable to build database project using invoke-databasebuild

I was using msbuild in a batch file to restore an existing database backup, build the project, and deploy for development purposes. Since msbuild is no longer supported after upgrading to version 4.4, I am switching to using the Powershell cmdlets but I am getting the following error when using the invoke-databasebuild command:

Skipping Shadow clean; [sql_change_automation_22fdfb01-2b2c-4fd9-8987-78eeed9a7799] does not exist
WARNING: System.Runtime.Remoting.RemotingException: Object '/8c2839e4_123a_48ca_90ff_edc04a885236/+ihwabghldm6qvu7oep1wjzq_33.rem' has been disconnected or does not exist
 at the server.
   at RedGate.Versioning.Automation.MsBuild.MsBuildTaskRunner.InnerRunner.PerformTask(String projectPath, IDictionary`2 globalProperties, String target)
   at RedGate.Versioning.Automation.MsBuild.MsBuildTaskRunner.PerformBuild(String projectPath, IDictionary`2 globalProperties)
   at RedGate.Versioning.Automation.Compare.Projects.ScaProjectBuilder.Build(ScaProjectPath scaProject, IDatabase database, Hashtable additionalPowershellSQlCmdParameters
)
   at RedGate.Versioning.Automation.Compare.SchemaValidation.ProjectBuilder.Build(IProjectPath projectPath, IDatabase database, CreateDatabaseParameters createDatabasePar
ameters, Hashtable additionalSqlCmdVariables)
   at RedGate.Versioning.Automation.Compare.SchemaValidation.DiskBackedProjectValidator.ValidateProject(IProjectPath projectPath, IDatabase database, CreateDatabaseParame
ters createDatabaseParameters, Hashtable cmdVariables)
   at RedGate.Versioning.Automation.Compare.SchemaValidation.ProjectValidator.ValidateProject(String projectPath, CreateDatabaseParameters createDatabaseParameters, Hasht
able cmdVariables)
   at RedGate.Versioning.Automation.PowerShell.Commands.InvokeDatabaseBuildCommandImpl.Process()
   at RedGate.Versioning.Automation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord()
   at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation)
Invoke-DatabaseBuild : An unhandled error occurred: System.Runtime.Remoting.RemotingException: Object 
'/8c2839e4_123a_48ca_90ff_edc04a885236/+ihwabghldm6qvu7oep1wjzq_33.rem' has been disconnected or does not exist at the server.
   at RedGate.Versioning.Automation.MsBuild.MsBuildTaskRunner.InnerRunner.PerformTask(String projectPath, IDictionary`2 globalProperties, String target)
   at RedGate.Versioning.Automation.MsBuild.MsBuildTaskRunner.PerformBuild(String projectPath, IDictionary`2 globalProperties)
   at RedGate.Versioning.Automation.Compare.Projects.ScaProjectBuilder.Build(ScaProjectPath scaProject, IDatabase database, Hashtable 
additionalPowershellSQlCmdParameters)
   at RedGate.Versioning.Automation.Compare.SchemaValidation.ProjectBuilder.Build(IProjectPath projectPath, IDatabase database, CreateDatabaseParameters 
createDatabaseParameters, Hashtable additionalSqlCmdVariables)
   at RedGate.Versioning.Automation.Compare.SchemaValidation.DiskBackedProjectValidator.ValidateProject(IProjectPath projectPath, IDatabase database, 
CreateDatabaseParameters createDatabaseParameters, Hashtable cmdVariables)
   at RedGate.Versioning.Automation.Compare.SchemaValidation.ProjectValidator.ValidateProject(String projectPath, CreateDatabaseParameters createDatabaseParameters, 
Hashtable cmdVariables)
   at RedGate.Versioning.Automation.PowerShell.Commands.InvokeDatabaseBuildCommandImpl.Process()
   at RedGate.Versioning.Automation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord()
   at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation)
At C:\x\x.ps1:9 char:1
+ Invoke-DatabaseBuild $project -TemporaryDatabaseServer "Data Source=S ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-DatabaseBuild], RemotingException
    + FullyQualifiedErrorId : UnhandledException,RedGate.Versioning.Automation.PowerShell.Commands.InvokeDatabaseBuildCommand

Answers

Sign In or Register to comment.