TeamCity ambiguous build failure

10,124

The error you're getting is only the return value from the MSBuild process. In order to debug the build process you need to run it for real - meaning in the same fashion as the build runner will, not doing a local debug build in your dev environment. Follow the steps here to increase the MSBuild logging to verbose and save it to a location where you can inspect it later.

If your application is reasonably complex or has lots of dependencies you'll probably have to spend a few hours writing a build script or editing the project files. If you write build script just change the build task in TC to execute the build script. That's generally the approach I've used with TC since editing the project files will affect your local debug builds.

Share:
10,124
Blaze Phoenix
Author by

Blaze Phoenix

Last Major Project: DevOps and Dev Enablement for Javascript Web App Current Personal Projects: AWS with some CloudWatch on a Factorio Server Upgrading Personal Website with AWS Code Pipeline

Updated on June 17, 2022

Comments

  • Blaze Phoenix
    Blaze Phoenix almost 2 years

    I am having trouble with my build for TeamCity. When I build the project locally, it compiles correctly, however, when TeamCity runs, the build fails with error Build failure condition: Process exited with code 1.

    I have two separate projects with this same failure condition and I have no idea even how to begin diagnosing the problem. One project is a C# library created via Visual Studio 2010 (and I use the VS Solution to compile that project) and the other is done using Xamarin Studio.

    The Xamarin Studio build step which is to compile the code uses the line (ignore the line breaks):

    "C:\Program Files (x86)\Xamarin Studio\bin\mdtool.exe" build
    "--project:MyProject" 
    "%teamcity.build.checkoutDir/MySolution.sln"
    

    Both projects compile on the build agent (when compiled locally through either Visual Studio or the command line command). Is there a way for me to have the build agent (i.e. the service running) to run the build config locally and test from there or what?