What's different about the TeamCity build-time environment? Issues with VB6 under NAnt

Hi all - I'm having an incredibly frustrating issue building VB6 under TeamCity.  In short, the same command line build that I can run, interactively, successfully, results in a slightly different and slightly broken executable when run by TeamCity.  Frankly, I have absolutely no idea what is going on.

I'm using a task from NantContrib that compiles the code using command-line parameters to VB6.exe.  If I run Nant myself from the command line on the build agent machine, using the build file I created for the CI, it compiles and the application works correctly.  If, however, TeamCity runs Nant, the executable produced is slightly (200KB) larger, and certain parts of the application behave incorrectly.  Specifically, a grid control in the application produces rows that are too small for the text they contain.

I've verified everything to make sure that TeamCity and I are doing the same thing: I've run the build from TeamCity's checkout directory. I've run it on a clean checkout. I've made sure we're running under the same user identity. I've switched TeamCity to run Nant as a command-line job rather than use TeamCity's built-in Nant integration. I've cracked open the NAnt log and run the VB6.exe line exactly the way NAnt was running it, bypassing NAnt.  I've made sure that TeamCity sets the PATH environment variable to be the same as during interactive execution.  And the result is always the same: TeamCity's output is slightly different from when I do the same thing, and broken.

I've been beating my head against this for a while.  Any clue what could possibly be different that would affect the outcome of running VB6.exe for a build?

Thanks much,
Daniel

6 comments
Comment actions Permalink

Have you tried to run agent via agent.bat file rather than via the service?

0
Comment actions Permalink

Pavel,

Awesome!  That works.  Of course, it's not ideal; I'd much rather administer the agent as a service.  Could this possibly be some file permissions issue?  I already had the service configured to run under the same credentials that I used to log in when I started agent.bat.  Do you know what else I could do to try to get the service to work, or have any other ideas why this might be happening?

Thanks again,
Daniel

0
Comment actions Permalink

Please take a look at the user under which the service is running (Service Properties -> Log on tab). If this is a local system account try to change it to the same user under which you start agent.bat. The problem can be in user permissions, but I have no explanation how it can affect size of the resulting file.

0
Comment actions Permalink

Pavel -

As I said above, the service is configured to use the same account that I used to start agent.bat. Any other ideas?

In any case, this will at least work for the meanwhile.  Thanks again.

0
Comment actions Permalink

Not sure whether it helps or not, but windows services also cannot access network mapped drives.

0
Comment actions Permalink

Pavel:  that sounds like it could very likely be a factor in this configuration.  I will check it out. Thanks!

0

Please sign in to leave a comment.