Create item in another project Visual studio 2013 Template

3

I'm creating a template in visual studio, but I want it to add an item to a project and it's created in all other solution projects, can anyone help me? the code is more or less this:

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
      <TemplateData>
        <DefaultName>WebApiConsulta.cs</DefaultName>
        <Name>WebApiConsulta</Name>
        <Description>&lt;No description available&gt;</Description>
        <ProjectType>CSharp</ProjectType>
        <SortOrder>10</SortOrder>
        <Icon>__TemplateIcon.png</Icon>
      </TemplateData>
      <TemplateContent>
        <References />
        <ProjectItem SubType="Code" TargetFileName="Projeto1/$fileinputname$.cs" ReplaceParameters="true">ConsultaGrupoProjeto.cs</ProjectItem>
   <ProjectItem SubType="Code" TargetFileName="Projeto2/$fileinputname$.cs" ReplaceParameters="true">ConsultaGrupoProjeto.cs</ProjectItem>
   <ProjectItem SubType="Code" TargetFileName="Projeto3/$fileinputname$.cs" ReplaceParameters="true">ConsultaGrupoProjeto.cs</ProjectItem>
      </TemplateContent>
    </VSTemplate>
    
asked by anonymous 17.04.2015 / 17:45

1 answer

1

I do not know if this is exactly what you need, but in the tutorial below the author shows how to create a template of multiple projects, so when you create the solution using the created template all projects of the template are already included. >

Source: link

I hope this is it.

    
28.07.2015 / 15:08