0

This question is related to this one.

I’m trying to build a Vs package that’ll add context menu to the project of a specific type. Actually, I’m trying to achieve the exact thing MVC3 has. MVC3 project shows different context menus depending on which folder within the project is currently selected. For “Controllers” folder you’ll get a menu item to create Controller, and for “Views” folder you’ll get a menu item that triggers wizard for Views.

Maybe someone knows if MVC3 Vs Package sources are open? I thought they are as MVC itself is open and one can get sources easily. But I couldn’t find sources for MVC3 Vs Package…

Thank you SO in advance.

Community
  • 1
  • 1
oddy
  • 1,890
  • 2
  • 16
  • 26

1 Answers1

0

The features you describe are a bit more than simple VSPackages. Those are actually implemented in a separate binary, which can be downloaded, it is called ASP.NET MVC3 Tools Update. You can read more about it here.

The custom context menus are all defined and associated with the project type GUID. The MVC3 GUID is

{E53F8FEA-EAE0-44A6-8774-FFD645390401}

and the MVC2 project type GUID is

{F85E285D-A4E0-4152-9332-AB1D724D3325}. 

So if you want to do such customizations, you do not have the MVC3 Tools binary's source for reference. I do not see it in Codeplex MVC sources anyway. You have to go to the pain of creating a ProjectType and this may help you do just that

Zasz
  • 12,330
  • 9
  • 43
  • 63
  • Thanks for you answer. I know it’s in the Tools Update. But the thing is that features I described are implemented in a VSPackage. If you unzip AspNetMVC3ToolsUpdateSetup.msi, you’ll see there a number of inner MS installers. We’re particularily interested in one called aspnetmvc3vs2010tools.msi. If you unzip it, you’ll see there all the T4 templates and custom projects. Except for that, you’ll see there an assembly called VisualStudio_VSW.Ext.dll. This assembly includes Package which implements all I need. – oddy Aug 19 '11 at 14:05
  • But I still cannot get all the information I need to complete my task. As I said, I already have a custom project template. I need a way to bind my menu in VSPackage with custom project and I don’t know how to do that. – oddy Aug 19 '11 at 14:11