Requiring a "clean build" prior to check-in
Another question that came up during our Team System migration was
How do we require developers to only check in code that compiles?
This is a perfectly reasonable request, since checking in code that doesn't compile would be pathological. But I'm sure you know your share of pathological developers, too..
At first glance, the existing check-in policies don't appear to work. Is it time to
create a new check-in policy? Not so fast!
It is possible to require a clean build prior to check in using the built-in policies, but it's not exactly intuitive.
All you need to do, as it turns out, is
add the Code Analysis check-in policy:

You don't have to actually
do any code analysis; you can de-select all the code analysis rules if you want. Just make sure you select "Enforce Code Analysis for Managed Code".

Once you enable this rule and attempt to check in non-compilable code, you'll get the expected "Hey, genius, you can only check in code that compiles" check-in policy warning:

That's because
code analysis requires a clean build to work its magic.
(with thanks to Erwyn Van Der Meer, who
first discovered this)