TFS build server takes longer to build than the local machine

I am working with an application that is built from several solutions.

When I build all of them on my local machine, it takes about 6 minutes. But when you create the TFS assembly on the server โ€” the virtual machine that runs Windows Server 2003 R2 with the TFS 2010 agent โ€” it takes up to 40 minutes.

I use non-incremental build (and I know that it takes more time ..), and the get-source part takes only about 2 minutes.

I canโ€™t understand why this can take such a long time compared to the local build. A solution that takes about 1.5 minutes on my local machine takes about 9 minutes on this server.

Any ideas / advice / recommendations, why this is happening / how to solve this problem?

UPDATE

I tried using a parallel assembly (using / m: 4), but it fails, I probably incorrectly defined the dependencies or something (I will check this later ..).

The VM build server is a quad core, 4G RAM.

I used MSBuild directly on this server, and a solution that takes 7.5-9.5 minutes when the agent starts the full build takes only 2.5 minutes. Is there anything the TFS build agent can do? (I REALLY do not understand this ...)

Thank you, young programmer.

+4
source share
2 answers

You can queue a new assembly with an override in the "Logging Verbosity" parameter to "Diagnostic" (it is located on the "Parameters" tab in Queue Build)

After that, open the assembly and click View Log. In the long list to be filled, each section will have the indication "Duration" on the right side.

I would study this magazine to find out where your delays come from.

+4
source
  • Try checking the performance summary to see why it takes so long - msbuild myproject.csproj / noconsolelogger /l:ConsoleLogger.Microsoft.Build.Engine.dll;performancesummary
  • Verify that parallel assembly is enabled on the assembly server.
  • Checking your HW virtual machine is comparable to your local machine
  • Make sure you turn off the antivirus so you donโ€™t check for viruses in the assembly directories
  • Check that your performance manager explains why it takes longer, which processes run at the same time during the build process ...
0
source

Source: https://habr.com/ru/post/1389419/


All Articles