multi file item template with custom file extension RRS feed

  • Question

  • Hi,

    I have a multi file custom file extenion like aspx, aspx.cs, aspx.designer.cs.




    In my csproj file if i manullay modify csproj file and add <DependentUpon>, the files show as single file in VS which can be expanded to see all files.

    But when I exported this as ItemTemplate, when I create item from this template; all the files are coming separately/individually.

    What should I do in my Itemtemplate, so that when i create item all of them should come as single file like aspx files.


    Saturday, August 21, 2010 3:41 PM


All replies

  • used Iwizard to programatically add the files as child files - http://www.codeproject.com/KB/dotnet/NestedItemTemplate.aspx

    Can this be done declaratively in vstemplate file?


    • Marked as answer by singhhome Monday, August 23, 2010 5:24 AM
    Saturday, August 21, 2010 6:05 PM
  • Hi Singhhome,

    See you  again.

    Based on my research, this can't be done in .vstemplate file. We'd better to use Iwizard to create an item which have nested items.

    If you only want to change existing ItemTemplate default items' names, for example: MasterPage Itempate, you can do it in .vstemplate file.

    If I misunderstood you, or you have any comments, please feel free to let me know.



    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, August 23, 2010 4:52 AM