2

I use devenv.exe to pass it a sln file and use /Rebuild switch, internally the devenv.exe spins up multiple msbuild's. I have a need to run unparalleled build, with only one thread of msbuild. Surely, I can use directly msbuild.exe with /M set to 1, but I have a specific requirement to use devenv.exe.

Is there any way by a command line switch or by using some environment variable which will allow me to do aforementioned.

Thanks in advance.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
user403943
  • 21
  • 1
  • 3

2 Answers2

2

So you want it to compile slower?

In your project file under C/C++ General you'll see a Multi-processor Compilation. Set that to No. Else remove the /MP switch from the commandline to cl.exe depending how you are compiling.

AJG85
  • 15,849
  • 13
  • 42
  • 50
  • 2
    "Is there any way by a command line switch or by using some environment variable" – Ben Voigt Sep 19 '11 at 21:38
  • I mentioned the commandline switch but he's using devenv.exe so he has the IDE and is building from solution files so the easiest way is to save the projects appropriately. – AJG85 Sep 19 '11 at 22:37
  • I figured he was talking about passing /m:1 to msbuild. – paulm Dec 10 '12 at 15:49
1

I tried the above solution and it did not work. Here's the correct solution I found from this duplicate topic:

How to do a parallel build in Visual Studio 2010

1. Tools -> Options
2. Projects and Solutions\VC++ Project Settings
3. Maximum concurrent C++ compilations
4. Set it to 1 (or the desired number)
Community
  • 1
  • 1
Chef Pharaoh
  • 2,387
  • 3
  • 27
  • 38