Problem with Red Gate Database Depoyment feature


I am using the Red Gate Database Deployment feature provided by Ocotpus Deploy (based on SQLCI from Red Gate). It is configured as part of a step that was added after migrating from Deployment Manager. I am using the default settings as the were automatically migrated (configuration as shown in image “rgfeature1”).

The deployment fails, and it is hard to tell why, but here is the raw log.

Success: Copy files to C:\Windows\system32#{OctopusPackageDirectoryPath}
23:41:23 Info | Copying package contents to ‘#{OctopusPackageDirectoryPath}’
| Failed: Octopus.Features.RedGateDatabase_BeforePostDeploy.ps1
23:41:36 Verbose | Running PowerShell script: C:\octopus\Applications\DEMO.SQ-AMAZE-DEV1-5889E783\Octopus.Tentacle\\Scripts\Octopus.Features.RedGateDatabase_BeforePostDeploy.ps1
23:41:37 Error | Where-Object : Method invocation failed because [System.String] doesn’t contain
23:41:37 Error | a method named ‘IsNullOrWhitespace’.
23:41:37 Error | At C:\octopus\Applications\DEMO.SQ-AMAZE-DEV1-5889E783\Octopus.Tentacle\2.5.11
23:41:37 Error | .614\Scripts\Octopus.Features.RedGateDatabase_BeforePostDeploy.ps1:45 char:87
23:41:37 Error | + $compareOptions = @($DATABASE_COMPARISON_OPTIONS -split “[,;]” | % {$.Tr
23:41:37 Error | im()} | ? <<<< {![string]::IsNullOrWhitespace($
23:41:37 Error | + CategoryInfo : InvalidOperation: (IsNullOrWhitespace:String) [W
23:41:37 Error | here-Object], RuntimeException
23:41:37 Error | + FullyQualifiedErrorId : MethodNotFound,Microsoft.PowerShell.Commands.Whe
23:41:37 Error | reObjectCommand
23:41:37 Info | Parsing connection string: Data Source=;Integrated Security=False;User ID=redgate_deployman;Password=********
23:41:37 Fatal | PowerShell script returned a non-zero exit code: 1

Does anyone have an idea what could be wrong?

Best regards, Markús

Hi Markús,

Thanks for getting in touch! This is a bug with PowerShell 2.0 - but we have fixed it
It will be part of the 2.5.12 release due out early next week.

Thanks for the report.

OK, FYI I believe I have PS 2, 3 and 4 installed on the tentacle.

PS C:\Users\markus\DOMAIN> $PSVersionTable

Name Value

PSVersion 4.0
WSManStackVersion 3.0
CLRVersion 4.0.30319.18444
BuildVersion 6.3.9600.16406
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2

Hi Markús,

Thanks for the reply. Yeah unfortunately the way PS, Octopus and Windows all behave together, it always runs the lesser. But we are fixing the script to run in PS2.0 and it will be part of the release next week.


Hi Vanessa, thank you. Is the release expected soon. I have a customer waiting.


Hi Markús,

It’s just been released: