开发者

IVsEditorAdaptersFactoryService.CreateVsTextViewAdapter throws an object null reference

I'm trying to create a IVsTextViewAdpater with the IVsEditorAdaptersFactoryService but when I call CreateVsTextViewAdapter it throws an object null reference:

开发者_如何学C
    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?


See this post

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜