Resharper SDK 2017.2.0 IRunningDocumentTable


i tried to update a resharper extension i wrote today to 2017.2.0. After updating the sdk, the namespace "JetBrains.VsIntegration.Interop" is gone. Previously i could use the Interface "IRunningDocumentTable" from it, to detect when a document was saved.

I tried substituting it with IVsRunningDocumentTable instead, but that gave me the following exception:

"Error creating type IVsRunningDocumentTable deferred component instance. A safety wrapper exists for the IVsRunningDocumentTable Visual Studio interface. You shouldn't be using the raw interface directly."

I thought that the missing IRunningDocumentTable is this safety wrapper, is there another one i can use?









1 comment

I am only using a Visual Studio Package but haven't had any problem with my implementation of RunningDocumentTable


public sealed class DocumentEventsMonitor : IVsRunningDocTableEvents3
private readonly RunningDocumentTable _runningDocumentTable;

public void Initialize(IServiceProvider serviceProvider)
_runningDocumentTable = new RunningDocumentTable(serviceProvider);


// ... Interface implementation


You can use whichever IVsRunningDocTableEvents[x] interface you want to support I use IVsRunningDocTableEvents3

But this seems to work fine for me. I think you have to hold the instance in class level property or field since once it goes out of scope it will be lost. In my case it is a class level field of my Package class. 





Please sign in to leave a comment.