I created a template project in vs2017, but I can not make template project references

0

Personally I created a template project in vs2017 with some projects that reference each other, as the Domain project has a reference to the CrossCutting project, but I can not get the template created with those references.

Base.Domain.csproj

<ProjectSdk="Microsoft.NET.Sdk">
   <PropertyGroup>
      <TargetFramework>netcoreapp2.1</TargetFramework>
   </PropertyGroup>
   <ItemGroup>
      <PackageReference Include="NETStandard.Library" Version="2.0.3" />
   </ItemGroup>
   <ItemGroup>
      <ProjectReference Include="..\$projectname$.Infrastructure.CrossCutting\$projectname$.Infrastructure.CrossCutting.csproj" />
    </ItemGroup>
    <ItemGroup>
      <Folder Include="Enums\" />
    </ItemGroup>
  </Project>

Domain.vstemplate

 <VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
  <TemplateData>
    <Name>Base Domain</Name>
    <Description>Template base de criacao de um projto AspNet Core</Description>
    <ProjectType>CSharp</ProjectType>
    <ProjectSubType></ProjectSubType>
    <CreateNewFolder>true</CreateNewFolder>
    <CreateInPlace>true</CreateInPlace>
    <SortOrder>1000</SortOrder>
    <DefaultName>Base.Domain</DefaultName>
    <ProvideDefaultName>true</ProvideDefaultName>
    <LocationField>Enabled</LocationField>
    <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
 </TemplateData>
 <TemplateContent>
    <Project TargetFileName="$projectname$.Domain.csproj" File="Base.Domain.csproj" ReplaceParameters="true">
      <Folder Name="Entities" TargetFolderName="Entities">
        <ProjectItem ReplaceParameters="true" TargetFileName="Base.cs">Base.cs</ProjectItem>
        <ProjectItem ReplaceParameters="true" TargetFileName="Sample.cs">Sample.cs</ProjectItem>
      </Folder>
      <Folder Name="Enums" TargetFolderName="Enums" />
      <Folder Name="Interfaces" TargetFolderName="Interfaces">
      <Folder Name="Dapper" TargetFolderName="Dapper">
          <Folder Name="Repositories" TargetFolderName="Repositories">
            <ProjectItem ReplaceParameters="true" TargetFileName="ISampleRepositoryDap.cs">ISampleRepositoryDap.cs</ProjectItem>
          </Folder>
       </Folder>
       <Folder Name="EntityFramework" TargetFolderName="EntityFramework">
          <Folder Name="Repositories" TargetFolderName="Repositories">
            <ProjectItem ReplaceParameters="true" TargetFileName="ISampleRepository.cs">ISampleRepository.cs</ProjectItem>
          </Folder>
          <Folder Name="UnitOfWork" TargetFolderName="UnitOfWork">
             <ProjectItem ReplaceParameters="true" TargetFileName="IUnitOfWork.cs">IUnitOfWork.cs</ProjectItem>
          </Folder>
        </Folder>
      </Folder>
    </Project>
  </TemplateContent>
</VSTemplate>

root.vstemplate

<VSTemplate Version="3.0.0" Type="ProjectGroup" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
  <TemplateData>
    <Name> Backend AspNet Core</Name>
    <Description>Backend Solution Template AspNet Core</Description>
    <ProjectType>CSharp</ProjectType>
    <ProjectSubType></ProjectSubType>
    <SortOrder>1</SortOrder>
    <CreateNewFolder>true</CreateNewFolder>
    <DefaultName>Teste</DefaultName>
    <ProvideDefaultName>true</ProvideDefaultName>
    <LocationField>Enabled</LocationField>
    <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
  </TemplateData>
  <TemplateContent>
    <ProjectCollection>
        <ProjectTemplateLink ProjectName="$projectname$.Api">
            Base.Api\WepApi.vstemplate
        </ProjectTemplateLink>
        <ProjectTemplateLink ProjectName="$projectname$.Domain">
            Base.Domain\Domain.vstemplate
        </ProjectTemplateLink>
        <ProjectTemplateLink ProjectName="$projectname$.Infrastructure.CrossCutting">
            Base.Infrastructure.CrossCutting\CrossCutting.vstemplate
        </ProjectTemplateLink>
        <ProjectTemplateLink ProjectName="$projectname$.Infrastructure.CrossCutting.Data">    

  Base.Infrastructure.CrossCutting.Data\CrossCutting_Data.vstemplate
        </ProjectTemplateLink>
        <ProjectTemplateLink ProjectName="$projectname$.Infrastructure.CrossCutting.IoC">

Base.Infrastructure.CrossCutting.IoC\CrossCutting_IoC.vstemplate
        </ProjectTemplateLink>
        <ProjectTemplateLink ProjectName="$projectname$.Persistence">
             Base.Persistence\Persistence.vstemplate
        </ProjectTemplateLink>
        <ProjectTemplateLink ProjectName="$projectname$.Quartz">
            Base.Quartz\Quartz.vstemplate
        </ProjectTemplateLink>
        <ProjectTemplateLink ProjectName="$projectname$.Service">
            Base.Service\Service.vstemplate
        </ProjectTemplateLink>
    </ProjectCollection>
  </TemplateContent>
</VSTemplate>
    
asked by anonymous 22.08.2018 / 00:46

0 answers