locked
How to create custom items in VS "New Project" wizard with an Add-in RRS feed

  • Question

  • I read some articles about how to create custom project by VSPackage. e.g. Projects Tutorial 1: How to Create a Basic Project System

    What I want to know is that whether it is possible to create custom items like the structure below by add-in in VS2005.

    __________________________

    ∟New Project_______________

    ∟Project Types:_____________

    | Θ - Visual C#

    |      ∟Windows

    |      ∟Smart Device

    |      ∟Database

    | ... ... ... ... ... ...         

    | Θ - My Type

    |      ∟My type1

    |      ∟My type2

     

    Wednesday, September 8, 2010 7:08 AM

Answers

  • Hi Liang,

    I don't think custom project type can be implemented via automation, because some features and APIs are not accessed to automation.

    The best way to create a custom project type is via MPF(Managed Package Framework), which you can reference to

    IronPython Integration in VS 2010

    Hope this can help.

     

    Best Regards,

    Ziwei Chen

    • Marked as answer by Liang Ye Tuesday, September 14, 2010 2:25 AM
    Monday, September 13, 2010 1:59 AM

All replies

  • This is entirely possible. Note the IronPythonIntegration sample does just this thing. Note the usage of the ProvideProjectFactory attribute in the PythonProjectPackage.cs. Specifically the (LanguageVsTemplate="IronPython") property. This sets up the requisite registry entries so that the New Project dialog can find your templates.

    Then note how the code under the Templates directory is not compiled, but is instead processed by a VSTemplate Build Action. If VS 2008, I think you have to review the .csproj file to see how the items are associated with a Zipxxx build task.

    Sincerely,


    Ed Dore
    • Proposed as answer by Ed DoreMicrosoft employee Wednesday, September 8, 2010 6:28 PM
    • Marked as answer by Victor_Chen Monday, September 13, 2010 1:59 AM
    • Unmarked as answer by Liang Ye Tuesday, September 14, 2010 2:26 AM
    Wednesday, September 8, 2010 6:28 PM
  • Thanks Ed.

    I read the IronPythonIntegration sample in VS2005 SDK but it looks like a VSPackage project.

    I had an add-in project and just want to know if I can add custom project type in the add-in instead of creating another VSPackage project.

    If not, I will do what Projects Tutorial 1: How to Create a Basic Project System told us.


    Thursday, September 9, 2010 5:31 AM
  • Hi Liang,

    I don't think custom project type can be implemented via automation, because some features and APIs are not accessed to automation.

    The best way to create a custom project type is via MPF(Managed Package Framework), which you can reference to

    IronPython Integration in VS 2010

    Hope this can help.

     

    Best Regards,

    Ziwei Chen

    • Marked as answer by Liang Ye Tuesday, September 14, 2010 2:25 AM
    Monday, September 13, 2010 1:59 AM