Error message from control app don't show up in build log
Hello,
I'm running FluentMigrator.Console as a part of the build process (MsBuild) with TeamCity and I'm getting this output in the build log (as seen on localhost:8080 on the build server):
(_Migrate target) ->
[13:07:09]: EXEC : !! An error has occurred. The error is: [C:\TeamCity\buildAgent\work\d7104026b14ab70d\trunk\XXXX.build.teamcity.patch.tcprojx]
The invocation looks like this in the .build file:
<Exec Command="$(FluentMigratorPath)/Migrate.exe "--target=$(BuildOutputPathBin)/XXXX.Data.Migrations.dll"
--db=sqlserver2005 "--wd=$(BuildOutputPathBin)" "-c=$(MigrationDb)" --verbose=true" />
And the code that generates that output looks like this:
line 1:
catch (Exception ex)
{
using (var message = new StringWriter())
{
message.WriteLine("An error occured executing the following sql: ");
message.WriteLine(sql);
message.WriteLine("The error was {0}", ex.Message);
}
}
this is then written to System.Console.Error : TextWriter.
How do I get the output?
Please sign in to leave a comment.