Log Encoding

I'm using the MSBuild Runner to execute an msbuild project. This project executes a command line tool of mine and during execution this tool writes some things to the console. This tool is written as .NET Console Application (I hope this makes sense). Finally all this information is visible in the Build Log of Team City. When this log information contains Greek characters they are not displayed with the correct encoding. I found the msg file created on the Server (.BuildServer\system\messages\CHxx) and I see that information is not properly encoded there also.
What can I do?

Comment actions Permalink

Do you have greek encoding as system default encoding for non-Unicode applications?
What account is used for build agent service?

Comment actions Permalink

Could you please try logging Greek characters from msbuild Message task. Is that message shown correct?

Comment actions Permalink

Actually I don't have anything configured as default encoding for non unicode applications. And I want to keep it that way since Greek is just an example.
I tried to log directly from MSBuild using Message task and Greek characters are logged properly. Good thinking! So the problem is in my command line application?

Comment actions Permalink

I believe the problem could be in console encoding that is used to run you commandline tool from MSBuild.
Please try specifying 'StdOutEncoding' and 'StdErrEncoding' attributes of MSBulid Exec task.

Could you please try do the following:
- stop build anget
- login as the same user as used to run build agent service
- open console window
- start msbuild with that project
- check weather messages are transmitted in right encoding



Please sign in to leave a comment.