Email notification - compilation errors

Hello,

I am using Team City Enterprise 5.1.2. I am using MSBuild runner.
The problem is that email notification does not contain compilation errors when the projects are compiled by passing list of projects into the msbuild task.
If I use the solution file then the copilation errors are correctly included into the email body.

How can I solve this problem? I do not want to use solution (*.sln file)

Regards!

6 comments

Hello,

Could you please submit an issue report in our tracker http://youtrack.jetbrains.net/issue/TW.

Thanks in advance,
Marina

0

Ok, I will.

But I though that maybe someone else had already noticed that behaviour before me.
Generally the problem is that msbuild errors are not detected as compilation errors when list of project files are used (*.csproj). When solution file is used (*.sln) everything works fine and that is the reason why email body is blank.

Overview log for project files:
Build errors
[08:30:12]: Project "FastIntegrationBuild.proj.teamcity.patch.tcprojx" (FastIntegrationBuild target(s)): (17s)
[08:30:29]: [Project "FastIntegrationBuild.proj.teamcity.patch.tcprojx" (FastIntegrationBuild target(s)):] Project "MyProject.csproj" (Build target(s)):
[08:30:29]: [Project "MyProject.csproj" (Build target(s)):] ConnectionManager.cs(23, 56): error CS1514: { expected
[08:30:29]: [Project "MyProject.csproj" (Build target(s)):] ConnectionManager.cs(23, 56): error CS1519: Invalid token ';' in class, struct, or interface member declaration

Overview log for solution file:

Compilation errors found

  • ConnectionManager.cs(23, 56): error CS1514: { expected       
  • ConnectionManager.cs(23, 56): error CS1519: Invalid token ';' in class, struct, or interface member declaration



Any idea?

Regards!

0

Do you use TeamCity 5.1.x or 6.0 EAP.
We improved logging in 6.0 EAP.
Please post this as issue into the tracker as Maria suggested.

0

Hello,

i am using TeamCity 6.0.3 and the problem described by k zapala still seems to be an issue. I am compiling vcxproj and use the correct logger option

(/l:JetBrains.BuildServer.MSBuildLoggers.MSBuildLogger,<path to dll>
), so that the build errors are shown on the Build Overview Tab, but the email notification does not contain the build errors.

Any solution?

Thanks


0

Hi,

i am sure i am not the first, but i figured out a workaround.
In my powershell script I encapsulate my call to the compile script with the "team city build script interaction" as follow (of course this could also be done in the script itself).

Write-Host "##teamcity[compilationStarted compiler='msbuild']"
& .\Compile.ps1 %system.teamcity.dotnet.nunitlauncher.msbuild.task%
Write-Host "##teamcity[compilationFinished compiler='msbuild']"

exit $LastExitCode

And as described somewhere else i pass in the path to the "team city  msbuild logger" for the compile script which is used for the call of  msbuild with '/l:JetBrains.BuildServer.MSBuildLoggers.MSBuildLogger,' +  $TeamCityLogger + ';verbosity=minimal' where  $TeamCityLogger is the param of the "team city  msbuild logger" for the compile script.

Hope this helps

0

Hello,

TeamCity MSBuild logger implementation treak building of .csproj, .vbproj, .vc?proj and .sln project files as compilation.
Otherwise you should report compilation blocks explicitly with service messages.

Thanks for workaround!

0

Please sign in to leave a comment.