In my VSIX project this error is shown on the line:
(AdapterService as IVsEditorAdaptersFactoryService).SetDataBuffer(textLines, projBuffer as IProjectionBuffer);
where textLines
is created using CreateInstance
method of my package
Type textLinesType = typeof(IVsTextLines);
Guid riid = textLinesType.GUID;
Guid clsid = typeof(VsTextBufferClass).GUID;
IVsTextLines textLines = (_package as Package).CreateInstance(ref clsid, ref riid, textLinesType) as IVsTextLines;
What actually is DocumentTextBuffer
property and how do I set it on a newly instantiated IVsTextLines
?
What I am trying to do is create a IVsTextLines
to pass it as a buffer to IVsCodeWindow
.