1
Vote

"Task attempted to log before it was initialized. Message was: OutputFileName=C:/test.sql" error.

description

I've receive "Task attempted to log before it was initialized. Message was: OutputFileName=C:/test.sql" white trying to use power tool to compare Database Schema. Searched over forums and docs, but error haven't gone.
 
There is source code:
        SqlSchemaCompareTask task = new SqlSchemaCompareTask();
        task.SourceConnectionString = "Data Source=GAMMA/SQLEXPRESS;Initial Catalog=LeadersAssistant_Activity_Development;Integrated Security=True";
        task.SourceDatabaseName = "LeadersAssistant_Activity_Development";
        task.TargetConnectionString = "Data Source=GAMMA/SQLEXPRESS;Initial Catalog=LeadersAssistant_Activity_Development;Integrated Security=True";
        task.TargetDatabaseName = "LeadersAssistant_Activity_Development";
        task.OutputPath = "C:\\logs";
        task.OutputFileName = "test.sql";
        task.Execute();

comments