TeamCity slow msbuild since upgrade to 9

1k Views Asked by At

We have upgraded from TeamCity 8 to 9 and our .net builders increased their build time from 3 minutes to 15 minutes.

We started investigating this issue, by doing the next steps:

  • Enabled "Performance Montioring" build feature - and we saw the disk io is maximum 9% and cpu is maximum 40% (our build agents have 2 cores and 4gb of memory)
  • Enabled .net runner logs to see if something in msbuildbootstraper takes lots of time.

After 2 days of investigation (we checked our antivirus, io, cpu and memory and every looks fine) we started to suspect that MsbuildBootstrap of jetbrains takes most of the time.

We took one build, that with "msbuildbootstraper" takes 32 seconds and switched it to "Command Line" runner and called msbuild our selves and the build time decrease to 5 seconds. We are currently thinking about downgrading to version 8 of teamcity or moving to tfs, before doing so - do you have any suggestions for fixing/throubleshooting this?

1

There are 1 best solutions below

1
On BEST ANSWER

And we found the solution: https://teamcity-support.jetbrains.com/hc/en-us/community/posts/206819485-JetBrains-BuildServer-MsBuild-Bootstrap-exe-9-0-9-9-0-14-hangs-for-30-seconds-on-TeamCity-9-0

As the link above says, add this configuration to MSBuildBootstraper:

<configuration>
    <runtime>
        <generatePublisherEvidence enabled="false"/>
    </runtime>
</configuration>

More info here: https://confluence.jetbrains.com/display/TCD9/Common+Problems#CommonProblems-Problemswith.Net-relatedTeamCityTools