Resharper suppresses event capturing for over add-ins

Now I am developing my own VS add-in. In this add-in I try to capture saving event of any document:

Events events = _applicationObject.Events;

DocumentEvents documentEvents = events.get_DocumentEvents(null);

documentEvents.DocumentSaved += new _dispDocumentEvents_DocumentSavedEventHandler(documentEvents_DocumentSaved);

documentEvents_DocumentSaved is not invoked if Reshrper is active. When I disable Resharper (Tools -> Add-in manager…) all works fine.

How can I capture saving events with activated Reshrper ?

2 comments
Comment actions Permalink

Hello,

Interesting. Does this also happen if the most recent version of R# (5.0
RC or newer) is installed? We're phasing out the use of VB API wherever possible,
and we aren't an addin anymore, which should minimize the impact.

I do not have any good ideas, nor time to investigate the thing right now.
If you have any suggestions on what we could change to make that VB event
work, you're welcome.

PS. I think that if you rather use C++ API for events, like IVsRunningDocTableEvents,
the document save notifications will be OK.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

There are quite few Visual Studio events which are implemented in a somewhat
strange manner. For example, there are events when only first subscriber
gets called, there are events that aren't get called when they should, etc.
I don't remember all of them, but probably you got one. If you disable ReSharper,
and put two similar addins on the VS, will both get that event?

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> Now I am developing my own VS add-in. In this add-in I try to
IR> capture saving event of any document:
IR>
IR> Events events = _applicationObject.Events;
IR>
IR> DocumentEvents documentEvents = events.get_DocumentEvents(null);
IR>
IR> documentEvents.DocumentSaved += new
IR> dispDocumentEventsDocumentSavedEventHandler(documentEvents_Documen
IR> tSaved);
IR>
IR> documentEvents_DocumentSaved is not invoked if Reshrper is active.
IR> When I disable Resharper (Tools -> Add-in manager…) all works fine.
IR>
IR> How can I capture saving events with activated Reshrper ?
IR>
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5259655#5259655


0

Please sign in to leave a comment.