I'm working on our continuous integration system, and I'm interested in simulating our systems handling of unexpectedly long compile times. Is there any way to cause the compilation to take a long time to complete? Or perhaps force it into some sort of loop that would take a large amount of time to compile? I'm looking for something as easy as Thread.Sleep() only on the compilation rather than the execution.
How about using preprocessor directives?
Any ideas?
Here's an MSBuild sleep task that should do the trick. Call it from BeforeBuild target in your .csproj file, or wherever is appropriate for your need.
MSBuild Community Tasks also has a Sleep task, so go with that if you need to use some of their other tasks, which I've found very useful.