简体   繁体   English

Visual Studio AddIn:如何将项目特定命令添加到解决方案资源管理器上下文菜单

[英]Visual Studio AddIn: How do I Add Item Specific Commands to the Solution Explorer Context Menu

I've spent about 3 days now trying to get this working but to no avail. 我花了大约3天试图让这个工作,但无济于事。

I'm fairly new to VS.NET extensibility and I find it hard to debug my problems. 我是VS.NET可扩展性的新手,我发现很难调试我的问题。

I've already tried the code here presented: Visual Studio Add-In - adding a context menu item to solution-explorer 我已经尝试过这里介绍的代码: Visual Studio加载项 - 向solution-explorer添加一个上下文菜单项

Couldnt make it work. 无法使它工作。 Debugged it and no exception is being thrown. 调试它并没有抛出任何异常。 Plus I'd rather use an AddIn instead of a Package. 另外,我宁愿使用AddIn而不是Package。

Anyone knows: 有谁知道:

  • How to obtain a list of all context menus in the solution explorer? 如何获取解决方案资源管理器中所有上下文菜单的列表?
  • How to add custom command groups to a context menu? 如何将自定义命令组添加到上下文菜单?
  • How to add a custom command to one custom command group of a context menu? 如何将自定义命令添加到上下文菜单的一个自定义命令组?

Thanks in advance. 提前致谢。

This article shows how to create and display a context menu with the same look and feel than the ones of Visual Studio to be used in your own add-in user-interface. 本文介绍如何创建和显示一个上下文菜单,其外观和感觉与您在自己的加载项用户界面中使用的Visual Studio相同。

Here is a tool that I recommend based on having used it: http://vssdkassist.codeplex.com/ . 以下是我推荐使用它的工具: http//vssdkassist.codeplex.com/ It is aimed at Visual studio packages as oposed to addins, but the method calls are similar between addins and vspackages. 它针对的是Visual Studio包,因为它们选择了addins,但是addins和vspackages之间的方法调用类似。 I would recommend setting up a vspackage project, use vssdkassist to do that, and use it to create your context menu. 我建议设置一个vspackage项目,使用vssdkassist来做,然后用它来创建上下文菜单。 I would then recommend researching into the method calls etc that vssdkassist sets up for you. 然后我会建议研究vssdkassist为你设置的方法调用等。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio加载项-将上下文菜单项添加到solution-explorer - Visual Studio Add-In - adding a context menu item to solution-explorer 在Visual Studio解决方案资源管理器中将菜单项添加到.cs文件(仅)? - Add menu item to .cs files (only) in Visual Studio solution explorer? 如何添加嵌套上下文菜单-Visual Studio插件 - How to add nested context menu - visual studio addin 使用Visual Studio插件基于解决方案中的多个项目项选择来添加上下文菜单 - Add context menu based on multiple selection of project items across solution using visual studio addin Visual Studio包:设置自定义解决方案资源管理器上下文菜单项的可见性 - Visual Studio Package: Settings the visibility of a custom Solution Explorer context menu item 如何在Windows资源管理器的“新建”上下文菜单中添加一个项目以打开一个窗口? - How do I add an item to Windows Explorer's “New” context menu which opens a window? 如何通过Visual Studio插件获取Visual Studio Project(在解决方案资源管理器中加载)的位置? - How to get Visual Studio Project (which is loaded in solution explorer) location via a Visual Studio Addin? 如何引用添加到Visual Studio解决方案的项目? - How do I reference items that I add to Visual Studio solution? 如何在Visual Studio 2010中将新项添加到项目上下文菜单? - How to add new items to the Add New Item to project context menu in visual studio 2010? Visual Studio 2010插件 - 将上下文菜单添加到解决方案资源管理器中 - Visual Studio 2010 Plug-in - Adding a context-menu to the Solution Explorer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM