So I'm modifying a multi-project VS Template (Visual Studio project template), and I want to set a Custom Parameter in the root template to be used by the sub templates. However, I want to set it based on an existing parameter.
So, for example, this works fine:
<CustomParameter Name="$FaultProject$" Value="MyProject.FaultContracts"/>
The variable $FaultProject$ is replaced by MyProject.FaultContracts, as it should be.
This, however, does not work:
<CustomParameter Name="$FaultProject$" Value="$safeprojectname$.FaultContracts"/>
I expect $safeprojectname$ to be replaced by the correct value, but it is not. Instead, the variable $FaultProject$ is replaced by $safeprojectname$.FaultContracts. The $safeprojectname$ is interpreted as a literal rather than the parameter that it is.
This is in spite of the fact that in the same file, this works exactly as expected:
<ProjectTemplateLink ProjectName="$safeprojectname$.FaultContracts">WCFFaultContract\FaultContract.vstemplate</ProjectTemplateLink>
Any ideas would be helpful. I believe I might be able to write an IWizard class that would do this, but I'd rather avoid that for such a simple function, if possible.
Alternatively, if I can get a parameter that contains the value of the root template's $safeprojectname$, that would address my need as well (in the sub-templates, $safeprojectname$ is changed to the sub-project's name, not the value it had in the root template).