I still haven't been able to get it to decrypt. I have tried various combos of the options without success. The resulting sql is always "text was encrypted"
using (var sourceDb = new Database())
var connectionProperties = new ConnectionProperties
ServerName = ".\\\\sqlexpress",
DatabaseName = "TestDB",
UserName = "sa",
Password = "sapassword"
var options = Options.Default | Options.DecryptPost2kEncryptedObjects | Options.AddWithEncryption;
var sql = new Work().ScriptObject(sourceDb.StoredProcedures, Options.Default).ToString();
And when calling Comparewith, the result from the messages / warnings is:
The procedure [dbo].[spTest] cannot be decrypted in one or more of the datasources. Its contents cannot be compared and it cannot be synchronized.
The procedure [dbo].[spTest] cannot be decrypted in one or more of the datasources. Its dependencies cannot be exactly identified. The script may fail.