Issue with TeamCity 4.0.1

Short statement about my environment:

.NET 2.0 (VS 2005)
Perforce
CC.Net
VisualBuild

CC.Net is just used to trigger builds and to afterwards collect the reports. VisualBuild is used to actually check out sources, build solutions, run unit tests, create reports, etc. Everything is working fine at the moment.

What I am trying to do as a first step migration to TeamCity is to run those VisualBuild scripts from within TeamCity. And there are two issues, one of them is more or less a cosmetic matter, the other is a road block at the moment.

1) Even though I've configured TeamCity to NOT checkout files automatically (since this is also done by the VisualBuild script) TeamCity insists on refreshing all my sources anyway, consuming some precious minutes of time which are totally wasted since VisualBuild's first action is to delete everything...

2) A few of our csproj files use post build events to do some copy actions after a successful build. In general this works okay for both, CC.Net and TeamCity. But even fewer of our projects do more than one line of shell commands in the post build event. And those work fine in CC.Net, but don't work at all unter TeamCity.

VisualBuild when started by TeamCity reports the following error:

copy "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\bin\Release\ServiceManager.dll"  "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\Source\ServiceManager\..\..\..\Shared\Monitoring"
xcopy "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\Source\ServiceManager\..\..\..\GlobalComponents\UniversalTranslator\Redistributables\Translator FileTree" "..\..\bin\Release\..\Translator FileTree" /S /Y /I
        1 file(s) copied.
'xcopy' is not recognized as an internal or external command,
operable program or batch file.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(3109,13): error MSB3073: The command "copy "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\bin\Release\ServiceManager.dll"  "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\Source\ServiceManager\..\..\..\Shared\Monitoring"
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(3109,13): error MSB3073: xcopy "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\Source\ServiceManager\..\..\..\GlobalComponents\UniversalTranslator\Redistributables\Translator FileTree" "..\..\bin\Release\..\Translator FileTree" /S /Y /I" exited with code 9009.
Done building project "ServiceManager.csproj" -- FAILED.


Further down, I can find a second error message, most probably an aftereffect:

Project : error PRJ0003: Error spawning 'cmd.exe'.

The appropriate part of a VisualBuild log file when started by CC.Net looks like this:

copy "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\bin\Release\ServiceManager.dll"  "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\Source\ServiceManager\..\..\..\Shared\Monitoring"

xcopy "D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\Source\ServiceManager\..\..\..\GlobalComponents\UniversalTranslator\Redistributables\Translator FileTree" "..\..\bin\Release\..\Translator FileTree" /S /Y /I
        1 file(s) copied.
D:\BuildRoot\TestcaseAPI\Head\Release\Monitoring\Source\ServiceManager\..\..\..\GlobalComponents\UniversalTranslator\Redistributables\Translator FileTree\xxxTree_.xml

[...]
11 File(s) copied


Help would be highly appreciated.

7 comments
Comment actions Permalink

Could you please check you use x86 build.
Check if you build agent service is not running under LOCAL SYSTEM account.
Thanks!

0
Comment actions Permalink

Could you please check you use x86 build.


Yes, the following exe is used in the service configuration: TeamCityAgentService-windows-x86-32.exe

Check if you build agent service is not running under LOCAL SYSTEM account.


The agent ist started with the a domain user account which is member of the local Administrator group. The web service is running unter the LOCAL SYSTEM account, though.

0
Comment actions Permalink

*Bump*

The issue is reproducable. I added a second line to a different project's after build event and made this fail. I don't see a way around this for me, so I cannot use TeamCity at the moment.

0
Comment actions Permalink

Do you use custom build checkout directory? Does you build files depends on the checkout folder and disk name?

What is the folder 'D:\BuildRoot\TestcaseAPI\'?

Thanks!

0
Comment actions Permalink

Do you use custom build checkout directory? Does you build files depends on the checkout folder and disk name?


Yes, I use a custom build checkout directory. The builds don't really depend on the base folder name, though. It's just because it is common practice and all macros within VisualBuild are made with this assumption in mind. I except to have a little trouble to switch to TeamCity's checkout directory. So this was my first shot.

What is the folder 'D:\BuildRoot\TestcaseAPI\'?


That's exactly the base of the checkout directory. But it is automatically extended by the build mode (Debug or Release) and the revision name (Head). That's what makes the VisualBuild scripts dependent from the location of the checkout directory. Build mode and revision are parameters of the VisualBuild scripts.

0
Comment actions Permalink

I've done some more research on this issue. Most important: Those two error messages mentioned in my first post (MSB3073 and PRJ0003) are independent from each other. Even if I remove the trouble causing second line from the post build event, the first error (MSB3073) vanishes but the second one (PRJ0003) remains in place. The second error is caused by the call to vcbuild to build a vc++ project which is part of this particular solution.

It's a pity. I've found a reproducable issue which blocks my evaluation of TeamCity for a complete week now. I really need your support desperately. Can you see a way to intensify your support other than one short callback question every second or third day?

0
Comment actions Permalink

Sorry for delays,
For the issue 1). You may simply disable any TeamCity checkout. For that, please open build configuration settings, select 'version control' and where set 'VCS checkout mode' to 'Do not checkout files automatically'. This will not break TeamCity changes collection.

For issue 2). Could you please check that agent's %path% variable contains path to xcopy.exe. Additionally, please check agent environment contains all variables that are defined by 'vcvars*.bat' call
For VS 2008 it is located at
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat
For VS 2005 it is located at
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat

A have created an related issue on vcvars.bat, please have a look/watch/vote for it at
http://www.jetbrains.net/tracker/issue/TW-6774

Thanks!

0

Please sign in to leave a comment.