如何以编程方式刷新 Visual Studio 解决方案资源管理器?
如何以编程方式刷新 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,您可以通过录制临时宏、做您想做的事情并查看宏编辑器中的结果来弄清楚这些事情。
事实上,在这种情况下,可能仅通过记录一个临时宏,您就可以弄清楚如何做到这一点。以下是刷新解决方案资源管理器的命令:
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: