I'm working on a pretty simple C# solution with two projects: a class library and an installer for the library. Building the class library itself takes about a second. Building the installer, however, takes an unpredictably/incredibly long time. More interestingly, the CPU appears to be "taking breaks" during compilation, spiking a single core for 5 to 10 seconds and then hitting near-0 for several seconds.
The installer project is pretty simple. It's just the output from the class library (a single DLL, about 2MB) and a few registry keys.
Any ideas what could cause this?!
After tinkering with things for awhile, I found that changing the Register setting to NOT REGISTER for COM in favor of having the DLL build perform the registration, the installer build became much more reliable (and faster). I'm not sure this constitutes a solution, since COM registration should simply work. But, I've at least been able to work around the issue.