--- lang: ja-jp breaks: true --- # `VSIX` 開かれているソリューションファイルのパスを取得 2022-01-26 ```csharp= using EnvDTE; using EnvDTE80; using Microsoft.VisualStudio.Shell; var dte2 = Package.GetGlobalService(typeof(DTE)) as DTE2; if (dte2 != null) { Debug.WriteLine($"{dte2.Solution.FullName}"); } ``` ###### tags: `VSIX` `Package.GetGlobalService` `DTE`