VSIX-在Visual Studio扩展中获取Rootsuffix

发布于 2025-02-06 04:37:19 字数 142 浏览 1 评论 0原文

要调试Visual Studio扩展,您可以使用某个“ Rootsuffix”启动实验实例。参见

有没有办法知道扩展代码中提供的Rootsuffix?

即“ exp”如果实例是从“ devenv.exe /rootsuffix exp”开始的

To debug Visual Studio extensions you can start an experimental instance with a certain "RootSuffix". See https://learn.microsoft.com/en-us/visualstudio/extensibility/the-experimental-instance?view=vs-2022.

Is there a way to know the provided rootsuffix in the code of your extension?

I.e. "Exp" if the instance was started with "devenv.exe /RootSuffix Exp"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

七七 2025-02-13 04:37:19

The DTE object has a CommandLineArguments property which contains the information you need.

夜访吸血鬼 2025-02-13 04:37:19

可以通过以下代码检索:

IVsAppCommandLine cmdline = (IVsAppCommandLine)GetService(typeof(SVsAppCommandLine));
cmdline.GetOption("rootSuffix", out var present, out var value)

Can be retrieved with following code:

IVsAppCommandLine cmdline = (IVsAppCommandLine)GetService(typeof(SVsAppCommandLine));
cmdline.GetOption("rootSuffix", out var present, out var value)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文