locked
Item template with multi files ? RRS feed

Answers

  • Oups, one link missing, i think i made a mistake, because i wanted to link one more link, that is written for 2010, but it just show steps to follow, you don't have more explanation. That's why i posted also the 2005 article

    Here it is. I use a custom tool generator in my 2010 extension (VSPackage) and i don't need to register it manually.

    PS : I posted the 2005 article because it's quite the same thing with 2008 and 2010
    • Edited by Mathias Herbaux Wednesday, September 12, 2012 6:10 AM
    • Marked as answer by Ego Jiang Tuesday, September 18, 2012 7:15 AM
    Wednesday, September 12, 2012 6:09 AM

All replies

  • I think they use a Custom Tool to generate associated files. You can refer to this article to deal with this. The problem is that a CustomTool need to be installed using a VSPackage.
    Tuesday, September 11, 2012 3:06 PM
  • Yeah that is good article, but it is in VS2005. Are there other articles describe new way in VS2008 and VS2010 ?

    And I saw it is register manually using regasm, is there a way to register automatically in deployment project ?


    It's hard to be advanced programmer

    Wednesday, September 12, 2012 3:36 AM
  • Oups, one link missing, i think i made a mistake, because i wanted to link one more link, that is written for 2010, but it just show steps to follow, you don't have more explanation. That's why i posted also the 2005 article

    Here it is. I use a custom tool generator in my 2010 extension (VSPackage) and i don't need to register it manually.

    PS : I posted the 2005 article because it's quite the same thing with 2008 and 2010
    • Edited by Mathias Herbaux Wednesday, September 12, 2012 6:10 AM
    • Marked as answer by Ego Jiang Tuesday, September 18, 2012 7:15 AM
    Wednesday, September 12, 2012 6:09 AM
  • Tanx for all info, from documents in MSDN I think there are no way I can add multi files dependency other than .cs , .designer.cs and .resx. Only three of these extension will autmatically arrange as dependency to .cs file.

    Meanwhile the Custom Tool only generete one file that auto dependent to input file. I hope there is a way to manipulate this using vspackages assembly,

    anyone can help me ?

    It's hard to be advanced programmer

    Thursday, September 13, 2012 1:27 PM
  • Maybe with DTE ?

    You can add an item to another.

    Let's say you want to add your personal item template inside a cs hierarchy.

    You have to register to the OnProjectItemAdded, check if it is a cs file, generate the new item using AddFromTemplate, and then add the generated to the cs file using AddFromFile, this file will be moved under cs file hierarchy

    Problem is that you need to register also OnRename event, because it will not rename automatically your file.
    Thursday, September 13, 2012 1:32 PM