[英]VS 2013 (2015) extension on solution explorer context menu
To add a context menu item to the solution explorer in Visual Studio, i can use the post Add context menu to VS 2010 solution explorer (display item on solution only) . 要将上下文菜单项添加到Visual Studio中的解决方案资源管理器,我可以使用将上下文菜单添加到VS 2010解决方案资源管理器(仅在解决方案上显示项目) 。
But is there a way to get the full filename of the selected solution? 但是有没有办法获取所选解决方案的完整文件名? And how to get the context menu to show only on project files and solution files so i can do somthing with the project file?
以及如何使上下文菜单仅在项目文件和解决方案文件上显示,以便我可以对项目文件进行处理?
To get the full filename of the currently opened solution you can use dte.Solution.FileName
. 要获取当前打开的解决方案的完整文件名,可以使用
dte.Solution.FileName
。
To add a menu command to a project in Solution Explorer you probably want to specify IDM_VS_CTXT_PROJNODE
as the parent id. 要将菜单命令添加到解决方案资源管理器中的项目,您可能需要指定
IDM_VS_CTXT_PROJNODE
作为父ID。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.