Teamcity and Visual Build, how to specify VSB macros?

Hi All

I'm using teamcity to build a legacy application that uses a Visual Build script. I'm trying to run it using the command line line runner.

it's working fine as long as i dont specify macros, however it's strange that the command works fine when executed in the cmd window of the agent..

this is the executable i specified(inlcuding the quotes):

"C:\Program Files\VisBuildPro\VisBuildCmd.exe"

this is the string i'm using as command line argument:

"LOGFILE=C:\sources\Build\log\install.log"  "BUILD_NUMBER=%env.SVN_REVISION%" "_COPY_TO_AUTOTEST=0" /nologo /nooutput /b "C:\sources\Build\buildscript.bld"

The Fulll log contains the following:

[13:48:54]: Start process: "C:\Program Files\VisBuildPro\VisBuildCmd.exe" LOGFILE=C:\sources\Build\log\install.log BUILD_NUMBER=90 _COPY_TO_AUTOTEST=0 /nologo /nooutput /b C:\sources\Build\buildscript.bld
[13:48:54]: in: C:\iPFG.Install
[13:48:55]: Process exited with code 1
i noticed the missing quotes in the logged statement, but i dont think this is the reason. I also tried escaping with \ and double quotes (""), without success.
I am using Version 4.5.1 of teamcity
Im happy for any suggestion
many thanks
Claudio
0
5 comments
Avatar
Permanently deleted user

Claudio,

Could you please try the following:
- Go to C:\iPFG.Install
- Run "C:\Program Files\VisBuildPro\VisBuildCmd.exe"LOGFILE=C:\sources\Build\log\install.log BUILD_NUMBER=90_COPY_TO_AUTOTEST=0 /nologo /nooutput /bC:\sources\Build\buildscript.bld

What you get in this case?

0
Avatar
Permanently deleted user

Hi Marina

i just tried and executed the command in the working directory. the visual  build script was executed as expected, no errors. my gut feeling says taht it's got something to do how TC passes the command arguments to the command line?

Cheers

Claudio

0
Avatar
Permanently deleted user

Did you run it under the same user account that TeamCity uses?

0
Avatar
Permanently deleted user

yes it (TC) is using the same account as i was using when executing the command locally

0
Avatar
Permanently deleted user

Please try specifying cmd.exe as executable and adding /c as first parameter, then executable, then all the parameters.

0

Please sign in to leave a comment.