Ioan Lazarciuc's Weblog I program, therefore I exist.

25Apr/102

Custom Parameters in Multi-Project Templates

Visual Studio project templates offer two ways of specifying template parameter values:

  • In the .vstemplate file, using a CustomParameters section, as described here.
  • Using a template wizard in order to specify run-time values in the IWizard.RunStarted method, as described here.

The problem is that these mechanisms don’t work as one would expect in the case of multi-project templates. The parameters specified in the root template are not picked up by the child project templates. I tried to find a workaround online but could not find anything. Finally, I came up with a workaround of my own.