如何以编程方式刷新 Visual Studio 解决方案资源管理器?

发布于 2024-08-23 20:55:48 字数 215 浏览 8 评论 0原文

如何以编程方式刷新 Visual Studio 解决方案资源管理器?

我可以获取解决方案资源管理器窗口对象,但不知道如何处理它!

var solutionExplorer = (UIHierarchy)DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object();

谢谢。

How can I programmatically refresh Visual Studio Solution Explorer?

I can get a hold of the solution explorer window object, but don't know what to do with it!

var solutionExplorer = (UIHierarchy)DTE.Windows.Item(Constants.vsext_wk_SProjectWindow).Object();

Thanks.

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

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

发布评论

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

评论(1

不羁少年 2024-08-30 20:55:48

通常,您可以通过录制临时宏、做您想做的事情并查看宏编辑器中的结果来弄清楚这些事情。

事实上,在这种情况下,可能通过记录一个临时宏,您就可以弄清楚如何做到这一点。以下是刷新解决方案资源管理器的命令:

DTE.Commands.Raise("{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}", 222, null, null)

Usually you can figure out these things by recording a temporary macro, doing what you want to do, and seeing what comes out in the macro editor.

Indeed, this is a case where it's probably only by recording a temporary macro that you can figure out how to do this. Here's the command to refresh the Solution Explorer:

DTE.Commands.Raise("{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}", 222, null, null)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文