I have created new type of project for Visual Studio 2010 (By dint of Visual Studio SDK) and this project consists of *.pat files. *.cpp files have in theirs context menu option "compile". I want to add such option into context menu of my type of files. How i can do it?
Asked
Active
Viewed 2,531 times
2 Answers
1
If you are creating a new type of project for Visual Studio probably you are implementing a VSIX (former VS Package)
To add a new Menu Item to Project Item Contextual Menu you need to declare a vsct file in your package, and inside VSCT attach your new menu item to Project Item Menu GUID

Jesus Salas
- 541
- 3
- 8
-
1Thanks. I've found answer. In case of a "standart" command like "compile" need to catch this option in file FileNode.cs by it's GUID and command id, and then make it visible and enable for my type of file. In case of another command really need to declare it in vsct file. Special thanks to David De Winter's article: http://davedewinter.com/2008/03/14/dynamic-menu-commands-in-visual-studio-packages-part-1/ – katagaeshi Jan 25 '12 at 15:13
-1
do you want to make an AddIn for Visual Studio? There is plenty of doc and samples for this, for example:

Davide Piras
- 43,984
- 10
- 98
- 147
-
"Why is this tagged c#?" Cause i'm doing it using C#. Yes, I want to make AddIn for Visual Studio. I use Microsoft Iron Python project like example. I have created basic project system by this example: [link](http://msdn.microsoft.com/en-us/library/cc512961.aspx) But i could not find how to add option to the context menu of file with my extension. – katagaeshi Aug 08 '11 at 06:49