VSIX Tutorial-Adding a simple template

Setup the template project

[IniSetup]
Locale=en-US
    <ProjectItem  
        ReplaceParameters="true"
        TargetFileName="$fileinputname$.tini"
        ItemType="Content">tiniTemplate.tini</ProjectItem>
    <ProjectItem  
        ReplaceParameters="true"
        TargetFileName="$fileinputname$.tini\$fileinputname$.cs" >tiniTemplate.cs</ProjectItem>

Include the template project inside the main project

    <Asset
        Type="Microsoft.VisualStudio.ItemTemplate"
        d:Source="Project"
        d:ProjectName="%CurrentProject%.IniParserTemplate"
        d:TargetPath="|MyExtension.IniParserTemplate;TemplateProjectOutputGroup|"
        Path="ItemTemplates"
        d:VsixSubPath="ItemTemplates" />

Screenshot

Conclusion

Now everything is in place!

You can download the code


Last modified on: November 28, 2013