Archive for May 23rd, 2010

ContextSwitchDeadlock was detected when debugging in Visual Studio 2008

May 23, 2010

Working with MS Excel, I’ve got this message too often: 😦

The CLR has been unable to transition from COM context 0x….. to COM context 0x….. for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. […] To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

That’s because my pc was overloaded 🙂 and every program was very slow. 😦

I disabled the message following these steps:
menù Debug \ Exceptions \ Managed Debug Assistants

source: ContextSwitchDeadlock was detected when debugging in Visual Studio 2005

Technorati tags: Visual Studio