I am manually creating a multi-project template for Visual Studio 2012 and I followed the guidelines from this page: http://msdn.microsoft.com/en-us/library/ms185308.aspx
The problem I am having is that a weird folder structure is created with this template that is not what I would normally expect. The folder structure I am getting for a solution called SolutionName:
[SolutionName] | \--- SolutionName.sln | \--- [SolutionName] | \--- Project1 | | | \--- Project1.csproj \--- Project2 | \--- Project2.csproj
Now, what I would normally expect would've been this:
[SolutionName] | \--- SolutionName.sln | \--- Project1 | | | \--- Project1.csproj \--- Project2 | \--- Project2.csproj
Is there any way to achieve the second folder structure?
Also, when specifying solution folders in the template, they're also being created as real folders, is there any way to avoid that?
This is how my multi-project vstemplate file looks:
<?xml version="1.0"?>
<VSTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Type="ProjectGroup" Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>My Multi-Solution Template</Name>
<Description>No Description.</Description>
<Icon>__TemplateIcon.png</Icon>
<PreviewImage>__PreviewImage.png</PreviewImage>
<ProjectType>CSharp</ProjectType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder> <!-- No use in trying false here. -->
<DefaultName>SolutionName</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<LocationField>Enabled</LocationField>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<SolutionFolder Name="Application">
<SolutionFolder Name="Tests">
<ProjectTemplateLink ProjectName="$safeprojectname$.UnitTests">UnitTests\UnitTests.vstemplate</ProjectTemplateLink>
</SolutionFolder>
<ProjectTemplateLink ProjectName="$safeprojectname$.Core">Core\Core.vstemplate</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$safeprojectname$.Infrastructure">Infrastructure\Infrastructure.vstemplate</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$safeprojectname$.Model">Model\Model.vstemplate</ProjectTemplateLink>
</SolutionFolder>
<SolutionFolder Name="Service">
<ProjectTemplateLink ProjectName="$safeprojectname$.ServiceHost">ServiceHost\ServiceHost.vstemplate</ProjectTemplateLink>
<ProjectTemplateLink ProjectName="$safeprojectname$.ServiceLibrary">ServiceLibrary\ServiceLibrary.vstemplate</ProjectTemplateLink>
</SolutionFolder>
</ProjectCollection>
<CustomParameters />
</TemplateContent>
</VSTemplate>
Thanks!