Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed

I was getting a really annoying error today, visual studio (vs2008) kept claiming "Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed". No didn't change anything though I swore after the 10th time. The code was compiling and running fine - I only got the error when I had a breakpoint set - without the breakpoint everything was hunky-doory.

Reading this connect bug http://connect.microsoft.com/VisualStudio/feedback/details/400456/edit-and-continue-preventing-execution-at-breakpoint-when-no-code-changes-were-made-in-vs2008 it looks like my issue was that I had silverlight and regular wpf/c# code in the same solution (different projects but some shared linked files with conditional #if SILVERLIGHT precompiler directives) and visual studio was somehow confusing the two.

Unloading the silverlight projects fixed the issue. The suggested work around on the connect site was to turn off edit and continue - that worked too.