Microsoft Visual Studio solution (.sln) runner and multi core cpu

Hello teamcity guys,

I use teamcity for build msvs application, using Microsoft Visual Studio solution (.sln) runner, and i have some problem with perfomance, Runner uses only one core, compilation goes into a single stream.
How can parallel compilation process?


With best regards,
Anton

5 comments
Comment actions Permalink

To utilize multiple cores you need to add '/m' command-line parameter to msbuild (as TeamCity uses MSBuild in solution runner). To do this go to settings of solution runner step, press 'show advanced options' and add '/m' as the 'command line parameters' parameter value

0
Comment actions Permalink

I added '/m' command-line parameter to "Microsoft Visual Studio solution (.sln)" runner in  'command line parameters'. And nothing happened.
I tried to add '/m:8', '/m:2', does not work.
If I understand  correctly,  "Microsoft Visual Studio solution (.sln)" uses MSBuild  as runner and must translate 'command line parameters' to MSBuild?
Can i see executable instructions in log files?

0
Comment actions Permalink

TeamCity passes parameters to MSBuild using MSBuild Properties files (http://msdn.microsoft.com/en-us/library/ms171458.aspx). Currently actual passed parameters are not logged. However, the properties file that is passed to MSBuild remain for some time in agent temp directory (AGENT_HOME\temp\buildTmp) in the form of msbuild-SOLUTION_NAME.tcargs.

There is a feature request, concerning the ability to view actual params in log: http://youtrack.jetbrains.com/issue/TW-12528 Please watch/vote

I have tried to add '/m' key to the solution runner and it was successfully passed to MSBuild by TeamCity
If you try to build your solution on agent machine through command line with '/m' option, does MSBuild utilize moltiple CPUs?

0
Comment actions Permalink

I tried build solution from command line with '/m' key, MSBuild utilize only one CPU. Build time is 1h02m. If i build using devenv.exe, build time is 22m.

0
Comment actions Permalink

There is a feature request for devenv.exe-based runner in out tracker.
As for now, you can use command-line runner to build project with devenv

Could you please create and issue in our tracker with the details of your configuration (type of projects or solution structure, version of VisualStudio and MSBuild, screenshot of build step settings) so we could reproduce and fix this problem?

Thank you

0

Please sign in to leave a comment.