I am creating an extension for similar functions that we used as addin.
When I debug the extension and the experimental VS instance opens, I get the following:
ContextSwitchDeadlock conflict occurred Message: Managed Debugging Assistant "ContextSwitchDeadlock" encountered a problem in "C: \ Program Files (x86) \ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ devenv.exe". Additional Information: The CLR was unable to switch from the COM context 0x1272878 to the COM context 0x12727c0 for 60 seconds. A thread that owns the target context / apartment most likely either performs a non-download or processes a very long operation without pumping Windows messages. This situation, as a rule, has a negative impact on performance and may even lead to the application becoming inactive or memory automatically accumulating over time. To avoid this problem, all threads with a single thread (STA) should use primitives waiting for pumping (for example, CoWaitForMultipleHandles) and regularly pump messages during long operations.
I read this post: Similar problem
and unchecked ContextSwitchDeadlock from the exception settings, but I didn’t feel comfortable with that.
Then I found this post (specifically Scott Munro's answer): Similar issue 2
and used the steps to go to the Thread window, but when I look at the main thread, I see only this:
Main Thread Microsoft.VisualStudio.CommonIDE.dll!Microsoft.VisualStudio.CommonIDE.ResourceLoader.FindResource.AnonymousMethod__0 [External Code]
So it doesn’t help much.
How do I solve ContextSwitchDeadlock? Besides just unchecking the MDA box. I also tried installing the published vsix (not downloaded to the gallery) on my computer, but it launched VS on a pop-up screen. I assume this is due to this problem.
This is what the main stream shows (row column conversion):
The main theme | Main topic Microsoft.VisualStudio.CommonIDE.dll! Microsoft.VisualStudio.CommonIDE.ResourceLoader.OpenAssemblyResourceManifest4
Normal
And this is what the Worker complainer shows:
Working theme clr.dll! Thread :: intermediateThreadProc ()
ntdll.dll!_NtWaitForSingleObject@12 Normal
I do not see anything in the callstack or find that my code is busy.