Visual Studio 2017 - 如何从 ENVDTE 获取当前 运行 版本

Visual Studio 2017 - How to get the current running edition from ENVDTE

我正在将 VSIX 包移植到 Visual Studio 2017,我需要从 VSPackage(企业、社区等)获取 运行 版本。

正在查看 ENVDTE interface it's pretty straightforward to get the version number, but not the edition. Up to VS 2013 it was possible at least to retrieve the installed edition from the registry but it seems it's not the case anymore as VS2017 uses a its own private registry

有人知道如何获得当前的 运行 Visual Studio 2017 版吗?

只读怎么样属性_DTE.Edition?

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