I'm creating a multi-project template in Visual Studio, and I got the basics up and running quite nicely.
MySolution.vstemplate
:
<VSTemplate Version="2.0.0" Type="ProjectGroup" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>My standard .NET solution</Name>
<Description>My standard .NET solution</Description>
<Icon>myicon.ico</Icon>
<ProjectType>CSharp</ProjectType>
<DefaultName>Customer.Project</DefaultName>
<SortOrder>5000</SortOrder>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<SolutionFolder Name=".nuget">
.... here I'd like to link to a few on-disk files to be included ......
</SolutionFolder>
<SolutionFolder Name="Batchjobs">
<ProjectTemplateLink ProjectName="$safeprojectname$.Batchjob">My batchjob\MyBatchjob.vstemplate</ProjectTemplateLink>
</SolutionFolder>
<SolutionFolder Name="build">
.... here I'd like to link to a few on-disk files to be included ......
</SolutionFolder>
<SolutionFolder Name="Testing">
<ProjectTemplateLink ProjectName="$safeprojectname$.IntegrationTests">MyIntegrationTests\MyIntegrationTests.vstemplate</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$safeprojectname$.UnitTests">MyUnitTests\MyUnitTests.vstemplate</ProjectTemplateLink>
</SolutionFolder>
</ProjectCollection>
</TemplateContent>
</VSTemplate>
However: the solution I'm trying to create with the several contained projects in reality also has several solution folders that correspond to on-disk directories and they contain some files; one is for the NuGet stuff, another is config and PowerShell script for our build process, and more.
I haven't been able to find anything online that would show me how to include solution folder and file items in them into my templated output solution. I can easily create solution folders - but it seems I cannot add any files to them in the templating process.....
Or am I missing something really simple here? Any ideas?