How to make TC5.0 recognize MSBuild compilation errors?

I have a .NET project with a Rake build script. Rake calls msbuild.exe to do the actual compilation. When I configure a TC 5.0 build (using the Rake runner), compilation errors are not recognized as such by TC.  When a compilation error occurs:

  1. The build does abort and is flagged as a failure;
  2. The log overview does not contain the compilation error message. I have to go to Build Log -> All Messages to see the failure;
  3. The compilation failure is not reported via email. The {COMPILATION_ERRORS} placeholder in my email notification template is replaced with a blank string.


What do I have to do to get TC to recognize the compilation errors?

Thanks in advance,
Seth Petry-Johnson

2 comments
Comment actions Permalink

You need to attach TeamCity msbuild listener to the started msbuld processes.

Use the following argument:
/l:JetBrains.BuildServer.MSBuildLoggers.MSBuildLogger,<path to dll>

The dll is located at: {agent}/plugins/dotnetplugin/bin/JetBrains.BuildServer.MSBuildLoggers.dll

The path is also available in the msbuild property '$(teamcity_dotnet_nunitlauncher_msbuild_task)'.
Thanks!

0
Comment actions Permalink

Worked like a charm. Thanks!!

0

Please sign in to leave a comment.