IVsEditorAdaptersFactoryService.CreateVsTextViewAdapter throws an object null reference
- by Adam Driscoll
I'm trying to create a IVsTextViewAdpater with the IVsEditorAdaptersFactoryService but when I call CreateVsTextViewAdapter it throws an object null reference:
var editorFactory = componentModel.GetService<IVsEditorAdaptersFactoryService>();
var serviceProvider = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)this;
var view = editorFactory.CreateVsTextViewAdapter(serviceProvider);
'this' is a Microsoft.VisualStudio.Shell.Package implementation.
Any ideas?