I have a project template that contains a powershell script called BuildStandard.ps1. Inside that script is the following excerpt:
Invoke-psake -buildFile $psakeScript `
-parameters @{
"solutionFile" = Resolve-Path("..\$SpecificSolutionName$.sln")
}
When a new project is added using the template, I want the $SpecificSolutionName$ parameter to be replaced with, well, the solution name. Only problem is that this content from the .vstemplate file isn't cutting it:
<TemplateContent>
<Project TargetFileName="PsakeInstallTestBench.csproj" File="PsakeInstallTestBench.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true">BuildStandard.ps1</ProjectItem>
</Project>
</TemplateContent>
What am I missing?
EDIT:
I've verified that if I replace $SpecificSolutionName$
with $safeprojectname$
, the parameter is replaced. I'm beginning to wonder if $SpecificSolutionName$
is available only for solution-level templates. Is there a workaround for this?