I'm working on a large C++ project in Visual Studio 2022 and need to reference the official API documentation for the Visual Studio SDK. The older MSDN pages seem to be moving, and I'm not sure where the latest documentation lives. Any pointers to the correct location, and whether there's a searchable index or offline PDF would be greatly appreciated.
Additionally, are there any recommended best practices for using the DTE (Development Tools Environment) objects in a modern C++ extension?
Comments (2)
The latest documentation is on Microsoft Learn under the "Extending Visual Studio" section. They have a searchable API reference for the
EnvDTEandMicrosoft.VisualStudio.Shellnamespaces.You can also download the offline help file (CHM) from the Visual Studio installer under the "Documentation" component.
When using DTE, remember that many operations are COM based and need proper thread marshalling. Use
ThreadHelper.JoinableTaskFactoryto switch to the UI thread before accessing DTE.Also, prefer the newer
IVsSolutionandIVsProjectinterfaces for most project manipulation tasks; they provide better performance and richer functionality.Leave a Comment