--- lang: ja-jp breaks: true --- # `VSIX` 現在開かれているファイルのパスを取得 2022-01-26 ```csharp= using Microsoft.VisualStudio.Shell; using EnvDTE; ThreadHelper.ThrowIfNotOnUIThread(); DTE dte = Package.GetGlobalService(typeof(SDTE)) as DTE; string filePath = dte.ActiveDocument.FullName; ``` ###### tags: `VSIX` `Package.GetGlobalService` `SDTE` `ActiveDocument`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up