Dreaded "allowDefinition='MachineToApplication'" error when building an MVC3 app
===

We have a VS 2010 solution with an MVC3 project in it.  Using the same build mode works fine, we can build as often as we like.

When we go from one build mode to another (Debug to Release to one of our custom ones) we get the error above and have to delete the obj directory to rebuild successfully.

If we move from one build mode to another and run a Clean Solution, then rebuild, we're ok.  But if we go from one build to another, then back to the first mode we're skunked and have to delete the obj folder once more.

Does this sequence of steps ring any bells as to the root problem?  I know that error message has multiple causes and am not sure which scenario we fall under.