Hi,
I am trying to create a multi project template. I wish the sub projects names to contain the solution name. I have tried the following however $safeprojectName$ doesn't work in the root template for some reason. It tries to create the folders with $safeprojectName$ in the name rather than the actual project name.
<VSTemplate Version="2.0.0" Type="ProjectGroup"
xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>Default Solution</Name>
<Description>An example of a multi-project template</Description>
<Icon>Icon.ico</Icon>
<ProjectType>CSharp</ProjectType>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<SolutionFolder Name="$safeprojectName$.Web">
<ProjectTemplateLink ProjectName="$safeprojectName$.Web">
Src\Web\MyTemplate.vstemplate
</ProjectTemplateLink>
</SolutionFolder>
</ProjectCollection>
</TemplateContent>
</VSTemplate>
I have done a lot of reading on this and have and have created an assembly using the IWizard interface that creates a parameter $solutionName$. I then used the following template.
<VSTemplate Version="2.0.0" Type="ProjectGroup"
xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>Default Solution</Name>
<Description>An example of a multi-project template</Description>
<Icon>Icon.ico</Icon>
<ProjectType>CSharp</ProjectType>
</TemplateData>
<TemplateContent>
<ProjectCollection>
<SolutionFolder Name="$solutionName$.Web">
<ProjectTemplateLink ProjectName="$solutionName$.Web">
Src\Web\MyTemplate.vstemplate
</ProjectTemplateLink>
</SolutionFolder>
</ProjectCollection>
</TemplateContent>
<WizardExtension>
<Assembly>DefaultSoloutionWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=f753ddb61a28cb36, processorArchitecture=MSIL</Assembly>
<FullClassName>DefaultSoloutionWizard.WizardImplementation</FullClassName>
</WizardExtension>
</VSTemplate>
This however also fails with the same problem. I'm I trying to do the impossible? Any help on this would be most welcome.