VC Build Issues

Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 4.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Search

Searching TeamCity 4.x Documentation

Table of Contents

If you experience any problems running VC++ build on a build agent, you can try to workaround these issues with the following steps, sequentially:

Any of these steps may solve your issue. Please feel free to leave feedback of you experience.
  • Make sure you do not use mapped network drives.
  • Make sure build user have enough right to access necessary network paths
  • Log on to the build agent machine under the same user as for build and try running the following command:
  • Build Agent service runs under the user with local administrative privileges
  • Make sure Microsoft Visual Studio is installed on the build agent
  • You have to start VS 2005 or VS 2008 under build user once http://www.jetbrains.net/devnet/message/5233781#5233781
  • If Error spawning cmd.exe appears, you should put the following lines exactly into the list in Tools -> Options -> Projects and Solutions -> VC++ Directories:

    http://www.jetbrains.net/devnet/message/5217957#5217957

  • You need to add all environment variables from ...\Microsoft Visual Studio 9.0\VC\vcvarsall.bat to environment or to buildAgent.properties file
  • Try using devenv.exe with Simple Command Runner instead of sln2005/sln2008 build runner
  • Ensure all paths to sources do not contain spaces
  • Set VCBuildUserEnvironment=true in runner properties
  • Specify 'VCBuildAdditionalOptions' property with value '/useenv' in the build configuration settings to instruct msbuild to add '/useenv' commandline argument for spawned vcbuild processes.




See Also:

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. May 27, 2009

    I just ran into the problem with VCBuild.exe failing to spawn cmd.exe during a mixed C#/C++ solution build. I am using my own user account to run the build agent as a service, and the account is an admin on the box. Exposing the environment path via an echo in one of the earlier project shows that it contains the "system" portion of the path but not the "user" portion (as seen in Windows System Properties -> Advanced -> Environment Variables), and it is the user path that contains C:\WINNT\System32, which is where cmd.exe resides. I have worked around this by setting the full path in the buildAgent.properties as suggested above, but this looks like a bug in the build agent to me.