[英]How to add action to Visual Studio Solution Explorer?
Please let me know how to add an action into the context-menu of "Solution Explorer" in Visual Studio? 请告诉我如何在Visual Studio的“解决方案资源管理器”的上下文菜单中添加操作?
I'd like to add my action into the context-menu of files listed in this explorer (see a screenshot for example), and then be able to launch my application (EXE file) that can get the filename (including its path) as an argument. 我想将我的操作添加到此资源管理器中列出的文件的上下文菜单中(例如,参见屏幕截图),然后能够启动我的应用程序(EXE文件),该文件可以获取文件名(包括其路径)一个论点。
I currently use VS2008, however please let me know if that should be different with VS2010 and VS2012. 我目前使用的是VS2008,但如果与VS2010和VS2012不同,请告诉我。
THANK YOU 谢谢
Write your own visual studio Add-In take a look at that link this is good place to start. 编写自己的visual studio插件,看一下这个链接,这是一个很好的起点。 but its not easy... 但它不容易......
You're going to have to write a Visual Studio Add-In. 您将不得不编写Visual Studio加载项。
Take a look at the code for the Xsd2Code addin on codeplex. 看一下codeplex上Xsd2Code插件的代码。 Specifically the Connect class . 特别是Connect类 。 This addin does something similar to what you want... it adds a context menu option that's available when you right-click on project items (in this case, only enabled for .xsd files). 这个插件做了类似于你想要的东西......它添加了一个上下文菜单选项,当你右键单击项目项时可以使用它(在这种情况下,只对.xsd文件启用)。
Also, check out the Solution Explorer Context Menu sample within the Visual Studio 2005 Automation Samples download. 另外,请查看Visual Studio 2005自动化示例下载中的解决方案资源管理器上下文菜单示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.