Wrong name of generated solution(.sln) file using custom template

22 views Asked by At

I generated custom multi-project template, according to the docs.

Here is the resultant vstemplate file:

<VSTemplate Version="2.0.0" Type="ProjectGroup"
    xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
    <TemplateData>
        <Name>MyTemplate</Name>
        <Description>Standardized application template</Description>
        <Icon>logo.png</Icon>
        <ProjectType>Web</ProjectType>
        <ProjectSubType>CSharp</ProjectSubType>
        <SortOrder>10</SortOrder>
        <DefaultName>MyTemplate</DefaultName>
    </TemplateData>
    <TemplateContent>
        <ProjectCollection>
            <SolutionFolder Name="General">
                <ProjectTemplateLink ProjectName="General">
                    General\MyTemplate.vstemplate
                </ProjectTemplateLink>
            </SolutionFolder>
            <SolutionFolder Name="User Management">
                <ProjectTemplateLink ProjectName="UserManagementAPI">
                    UserManagementAPI\MyTemplate.vstemplate
                </ProjectTemplateLink>
                <ProjectTemplateLink ProjectName="UserManagementBusiness">
                    UserManagementBusiness\MyTemplate.vstemplate
                </ProjectTemplateLink>
                <ProjectTemplateLink ProjectName="UserManagementData">
                    UserManagementData\MyTemplate.vstemplate
                </ProjectTemplateLink>
            </SolutionFolder>
        </ProjectCollection>
    </TemplateContent>
</VSTemplate>

The issue that I'm facing is, when new application/project is created using this template, the solution name I provide is ignored, instead, the name of the solution becomes the first SolutionFolder's Name attribute under ProjectCollection, in this case, it'll be General.sln. Other than that, everything works as expected.

0

There are 0 answers