How to specify the amount of CPU cores to be used by Visual Studio (sln) runner

Hi all,


I would like to specify how many CPU core Visual Studio (sln) runner should utilize. But this should be specified for each agent. How to do this?

Use case: there are several agents connected to the single server, and some of them are used for other tasks as well, so the builds should be performed on 1-2 CPU cores there in order not to overload the PC (normally the build utilized all CPU cores, and the PC becomes less responsive).

I know there is an option of MSBuild /maxcpucount, but how can it be passed to a Visual Studio runner?
And I suppose some file (like buildAgent.properties) may hold such setting for the choosen agents...

Thanks for the hints in advance!

2 comments
Comment actions Permalink

Try passing /m as a command line parameter

0
Comment actions Permalink

Thanks for the hint!
Actually I've already found the solution which works fine in my case.
It is enough to specify the line
  system.maxcpucount=1
in buildAgent.properties.

0

Please sign in to leave a comment.