I am creating a WinForms UI to allow the user to select the difference items that they want to synchronize. I then call the following method to build the work item from the selected differences. But work.BuildFromDifferences throws a NullReferenceException. I have checked the differences object and it seems to be all there. What is missing ?

using RedGate.SQL.Shared;
using RedGate.SQLCompare.Engine;

public static void SynchronizeDatabases(Differences differences)
{
Work work = new Work();
work.BuildFromDifferences(differences, Options.Default, true);
...
}


Thanks in advance,
Rich B.


It turns out that I was calling Dispose() on the DB objects prior to running SynchronizeDatabases. I now call Dispose() after the Sync and all is well :D
rbaudisch
0

Add comment

Please sign in to leave a comment.