xbuild solution at linux

When I run my build it will fail with the following log:

[14:14:45]Checking for changes
[14:15:02]Publishing internal artifacts
[14:15:02]Clearing temporary directory: /var/TeamCity/buildAgent/temp/buildTmp
[14:15:02]Free disk space requirement
[14:15:02][Free disk space requirement] Free disk space requirement of 3.0Gb is not met for directory /var/TeamCity/buildAgent/work/870524f98b27404c (only 2474.7Mb is free).
[14:15:02][Free disk space requirement] Free disk space requirement of 3.0Gb could not be met for directory /var/TeamCity/buildAgent/work/870524f98b27404c (only 2474.7Mb is free)
[14:15:02]Checkout directory: /var/TeamCity/buildAgent/work/870524f98b27404c
[14:15:02]Repository sources transferred
[14:15:02]Updating sources: server side checkout
[14:15:02]Starting: /usr/bin/mono /var/TeamCity/buildAgent/plugins/dotnetPlugin/bin/JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:/var/TeamCity/buildAgent/work/870524f98b27404c /msbuildPath:/usr/lib/mono/4.0/xbuild.exe
[14:15:02]in directory: /var/TeamCity/buildAgent/work/870524f98b27404c
[14:15:03]Process exited with code 1
[14:15:03]MSBuild output
[14:15:03][MSBuild output] Start MSBuild...
[14:15:03][MSBuild output] '/usr/bin/mono' '/usr/lib/mono/4.0/xbuild.exe "@/var/TeamCity/buildAgent/work/870524f98b27404c/MyNancy.sln.teamcity.msbuild.tcargs" MyNancy.sln'
[14:15:03][MSBuild output] working dir = '/var/TeamCity/buildAgent/work/870524f98b27404c'
[14:15:03][MSBuild output] MSBUILD: error MSBUILD0004: Too many project files specified
[14:15:04]Publishing internal artifacts
[14:15:04][Publishing internal artifacts] Sending build.finish.properties.gz file
[14:15:04]Build finished

Is there a way to catch the tcargs file contents? It is not in the temp dir of the buildagent. Maybe someone knows what I am doing wrong. When I call the xbuild on the working dir manually it builds fine.

Comment actions Permalink

What version of TeamCity is it?

Most likely, you specified the path to .sln file twice. Once for MSBuild runner and once in custom parameters section.
Please attach screenshot of MSBuild runner settings to analyze

Comment actions Permalink

I use the latest version of TeamCity (7.0.3) as shown in the above screenshot. I tried it with MyNancy.sln and ./MyNancy.sln. I think it is the properties file tcargs which xbuild sees as a solution/project, but as I said, I have no clue how to capture the contents of these files. I use mono 2.10.5 from ubuntu 11.04.

Comment actions Permalink

You may find a copy of .tcargs file under agent's temp folder (<agent>/temp/agentTmp or <agent>/temp/buildTmp)
Will you attach .tcargs file for me too analyze?
Is it possbile to start xbuild with max possible diagnostics level to see where the issue was.

Please check if you have one of the following issues:

Comment actions Permalink

I found the tcargs file. I dived in the source of xbuild, and it looks like it won't work with the properties supplied in a file. All properties need to get set on the commandline. Is this recently changed in teamcity or in the handler? Is there an option to the msbuild runner to supply all the properties on the command line instead of the tcargs file?
I editted the above because it is wrong.

Message was edited by: Andre Broers

Comment actions Permalink


Under Windows there are stict limits on commandline size. This was the reason why we had to use MSBuild arguments file to pass most parameters to it.
We use the file since early times MSBuild/XBuild are supported in TeamCity.

As far as I know, this also worked good with Mono XBuild too and parameters file is oficially supported by MSBuild starting from 2.0.
Do you confirm, that starting form newer version of xbuild it no longer support parameters files?

Comment actions Permalink

Sorry my fault. The tcargs file has to start with a @ sign, which is correct. I continue to search..

Comment actions Permalink


I've also encountered this issue and may be able to add something...

xbuild seems to support the @file, but only if a relative path is provided. Example:

# /usr/lib/mono/4.0/xbuild.exe '@/etc/hosts' hello
MSBUILD: error MSBUILD0004: Too many project files specified


#/usr/lib/mono/4.0/xbuild.exe '@hosts' hello
Unhandled Exception: System.IO.FileNotFoundException: Could not find file ""

So it seems like if TeamCity would switch to a relative path, the problem might be solved.

BTW I have no idea what triggered this behavior, since our TeamCity was building fine until very recently (perhaps our upgrade from 7.0.2 to 7.0.3 has something to do with it?).

Thanks for any help you could provide with this issue!

Comment actions Permalink

Shay, please create an issue in the issue tracker at http://youtrack.jetbrains.net

Comment actions Permalink

Some continued digging showed that the problem was elsewhere... TeamCity passes /nodeReuse:false to xbuild, but this parameter doesn't exist. Unfortunately xbuild's cmdline parsing is somewhat brain-damaged so the unknown switch gets reported as another project file.

Opened an issue: http://youtrack.jetbrains.com/issue/TW-21999


Please sign in to leave a comment.