We have a Visual Studio 2005 solution with 50 projects (mostly class libraries and some Win Form projects).
Doing a clean debug build with a freshly started Visual Studio peak memory usage (recorded by task manager) shows about 500mb.
Doing the same build (clean, debug) with MSBuild the peak memory usage is about 1600mb and it eventually fails with an OutOfMemory exception.
This is the command I'm executing:
MSBuild LargeProject.sln /target:clean;build /nologo /property:Configuration=debug /verbosity:minimal
Both were run on the same PC which has Windows XP Professional 32bit with 2gb of physical ram.
I found this MSDN article describing the differences between building in Visual Studio and MSBuild but does not explain why the build requires 3 times the memory.
Does anyone know why this happens? And if there is something that I can do to reduce the memory requirements of MSBuild.