Teamcity failed to start msbuild with code MSB4025

Hello,

since a few days sometimes we have the problem that TeamCity (Version 5.1.4) could not start our msbuild project files.
The Logs shows us this error message:

[09:01:48]: Targets was not defined in the build configuration.
[09:01:53]: X:\BuildAgentWorking\Pinky\work\e25c45d6c6f4f855\build.proj.teamcity.patch.tcprojx  error MSB4025: The project file could not be loaded. The specified  path, file name, or both are too long. The fully qualified file name  must be less than 260 characters, and the directory name must be less  than 248 characters.
[09:01:54]: MSBuild output:
[09:01:54]: TeamCity MSBuild bootstrap v5.1 Copyright (C) JetBrains s.r.o.
[09:01:54]: Start MSBuild...
[09:01:54]: 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe'   '"@X:\BuildAgentWorking\Pinky\work\e25c45d6c6f4f855\build.proj.teamcity.msbuild.tcargs"   X:\BuildAgentWorking\Pinky\work\e25c45d6c6f4f855\build.proj.teamcity.patch.tcprojx'
[09:01:54]: working dir = 'X:\BuildAgentWorking\Pinky\work\e25c45d6c6f4f855'
[09:01:54]: Microsoft (R) Build Engine Version 2.0.50727.3053
[09:01:54]: [Microsoft .NET Framework, Version 2.0.50727.3615]
[09:01:54]: Copyright (C) Microsoft Corporation 2005. All rights reserved.
[09:01:54]: X:\BuildAgentWorking\Pinky\work\e25c45d6c6f4f855\build.proj.teamcity.patch.tcprojx  : error MSB4025: The project file could not be loaded. The specified  path, file name, or both are too long. The fully qualified file name  must be less than 260 characters, and the directory name must be less  than 248 characters.




if i log in on the build server and start the msbuild project from the command line everything works.


Any hint?


Regards,


Stefan
2 comments

Please check user account that is used to run build agent windows service.

0

I don't thinkt that the user Account has something todo with the problem because it works without problems most of the time. But one or two times a day we get this error message.
We recogniced that if we delete the sources from the Build Agent every start works without a problem; so our workaround is to define the system property teamcity.build.checkoutDir.expireHours
with the value 0, so the build agent cleans up all sources after building. But fetching all sources for every build taks a very long time so it would be greate to find a solution for this problem.

0

Please sign in to leave a comment.