I am creating a Multi project Template
The problem is that when I run the template each project creates a directory folder that matches the project name.
I don’t want each of the projects creating folders by default, like this:
solutionfolder\Libraries\BL\projectname\my files – and csproj filesolutionfolder\Libraries\BL\interfaces\projectname\my files – and csproj file
What I want is:
solutionfolder\Libraries\BL\my files and csproj filesolutionfolder\Libraries\BL\interfaces\my files and csproj file
I have tried <CreateNewFolder> false </CreateNewFolder> but this does not work
Q: How can I create a project template without creating a project folder?
<ProjectCollection>
<SolutionFolder Name="Libraries">
<SolutionFolder Name="BL">
<SolutionFolder Name="Interfaces">
<ProjectTemplateLink ProjectName="BL_$safeprojectname$_Interfaces">Libraries\BL\Interfaces\MyTemplate.vstemplate</ProjectTemplateLink>
</SolutionFolder>
<ProjectTemplateLink ProjectName="BL_$safeprojectname$">Libraries\BL\MyTemplate.vstemplate</ProjectTemplateLink>
</SolutionFolder>
</ProjectCollection>
You can move around folders and project items by creating a Wizard Template. Just put the logic in the ProjectFinishedGenerating() method.
I used this file as a reference for my own template, specifically the MoveProjectTo() method.
WizardImplementation.cs (
original link, cached)