开发者

msbuild slower than devenv

开发者 https://www.devze.com 2022-12-23 12:53 出处:网络
I\'m experiencing performance inconsistencies with regards to build duration when building a VS2008 solution file with either devenv or msbuild from command line.

I'm experiencing performance inconsistencies with regards to build duration when building a VS2008 solution file with either devenv or msbuild from command line.

My solution contains both C# and C++ projects, and I have these results:

devenv.exe (either command line or within the ide): 7 minutes msbuild.exe: 14 minutes

I tried tuning the msbuild switches passing /maxcpucount and开发者_StackOverflow /p:VCBuildAdditionalOptions=m# but with no luck so far.

Any idea?


MSBuild can be slower on VC projects. It does some gymnastics to build them, because they're not MSBuild format, and can't get much parallelism. Instead, try running VS on the command line- devenv.exe /build - if you need the performance. Or, upgrade to VS2010, because VC projects are natively built by MSBuild and you will get your performance back. It will typially be faster than VS.

Of course, the killer way to get build speed is to build only what has changed, and rely on incremental build. Most of the time, most developers should be doing quick incremental builds.

Dan


what is the full msbuild command you are running?

As a side point, have you got the build output turned down to Quiet or Minimal? That reduces build time a little...

7 minutes to build in the IDE!! Personally I'd go insane, debugging must be a nightmare :-|

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号