简体   繁体   English

如何向Visual Studio Solution Explorer添加操作?

[英]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.

相关问题 visual studio:为什么需要为解决方案资源管理器添加ref? - visual studio: why need to add ref to solution explorer? 在Visual Studio解决方案资源管理器中将菜单项添加到.cs文件(仅)? - Add menu item to .cs files (only) in Visual Studio solution explorer? 在Visual Studio 2010的解决方案资源管理器中禁用添加引用 - Disabled Add Reference in Solution Explorer on Visual Studio 2010 Visual Studio解决方案Explorer位置 - Visual Studio Solution Explorer Position Visual Studio 2010 Solution Explorer - Visual Studio 2010 Solution Explorer Visual Studio AddIn:如何将项目特定命令添加到解决方案资源管理器上下文菜单 - Visual Studio AddIn: How do I Add Item Specific Commands to the Solution Explorer Context Menu Visual Studio:解决方案资源管理器上的上下文菜单太长,可以添加子菜单吗? 或解决方案资源管理器上方的工具栏? - Visual Studio: Context Menu on Solution Explorer too long, Can add a sub menu? or a toolbar above solution explorer? 如何在visual studio 2010或visual studio 2012的解决方案浏览器窗口中显示解决方案? - how to make solution visible in solution explorer window of visual studio 2010 or visual studio 2012? 如何在Visual Studio 2010的解决方案资源管理器中突出显示当前打开的文档 - How to highlight a currently opened document in the Solution Explorer in Visual Studio 2010 如何在 Visual Studio 中同步代码窗口和解决方案资源管理器? - How to sync a code window and solution explorer in Visual Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM