Octopus Deploy.ps1 DACPAC Deployment Fails Octopus Deploy.ps1 DACPAC Deployment Fails powershell powershell

Octopus Deploy.ps1 DACPAC Deployment Fails


Ok guys I figured it out. Here's what I did:

in the ps1 file add a try catch block where $d.Deploy is called like so:

 try {     # Deploy the dacpac     $d.Deploy($dp, $dbName, $TRUE, $dacProfile.DeployOptions) } catch {     Write-Host "LoadException";     $Error | format-list -force     Write-Host $Error[0].Exception.ParentContainsErrorRecordException; }

Doing this told me that the sqlproj file was aimed at Sql Server 2014, but the database being deployed to is Sql Server 2012. Simply go into the properties of the sql project file and change it so it's aimed at Sql Server 2012 and now it works! Huzzah!