Visual studio add-in does not work with multiple VS instances open

1

I'm working on a Visual Studio add-in that displays a stage in a (windows form) window. Creating a new special project (related to the add-in) makes a new project with all the necessary .dlls for the user to interact with the stage in their own code. In the stage, actors move around and can interact with other actors. The stage has UI that allows users to create new actors. The users are supposed to be able to alter .cs files while the stage exists. The reason it's an add-in is so users can create and edit the code of the actors, compile it, and see the results of their actors on the stage immediately.

Anyway - this works fine until there are two instances of Visual Studio open. The second one fails to paint anything (I get the red X's in the Windows Form window). I get an error telling me "It is illegal to call out when inside message filter. (Exception from HRESULT: 0x80010005 (RPC_E_CANTCALLOUT_INEXTERNALCALL)). I've searched around and the most relevant thing I could find is that it may be an issue with COM controls or painting. I'm not really sure. Has anyone encountered this error under these circumstances? Is there a fix to get my add-in to run fine over multiple instances of VS?

c#
visual-studio-2010
visual-studio-addins
asked on Stack Overflow Oct 12, 2012 by Alex George

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0