Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

[VB]Accessing the DTE Object in a VSIX Extension for Visual Studio 2017

$
0
0

I am working on a VSIX Extension for Visual Studio 2017 (this is my first time writing an extension). The app deals primarily with the text editor, so I am attempting to access and plan on using a TextDocument. I have installed the Visual Studio SDK and have looked at the example code on the following page:

https://docs.microsoft.com/en-us/dotnet/api/envdte.dte?view=visualstudiosdk-2017

However, I am having trouble accessing the DTE object. The page even says that DTE is an Interface, but it does not look like that is how it is being used, and in many of my attempts to get my VSIX to work I am getting errors about things such as DTE being an Interface so I can't do this or that with it. I will also mention that almost all examples and info I have found about VSIX Extensions uses synchronous methods, but the templates in Visual Studio 2017 (at least the ones that got installed on my machine) are creating Async methods (the synchronous methods are still there, but not implemented automatically). For example, my package class inherits from AsyncPackage and overrides InitializeAsync. Is there anywhere that I can find good info about DTE, and see examples that use the Async methods? Thanks.


Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>