If you run the NetTiers template via cs.exe in NAnt the properties get reset and the code gets generated in the default directory (c:\NetTiers).
This bug does not show itself when you are running the template from the CodeSmith IDE.
The problem seems to be within the OnPropertyChange event in NetTiers.cst (line 375-392):
#region OnPropertyChanged
#if CodeSmith40
protected override void OnPropertyChanged(string propertyName)
{
if((this.State == TemplateState.Default || this.State == TemplateState.Validating)
&& propertyName == "ChooseSourceDatabase")
{
MappingFile = "";
OutputDirectory = "";
RootNameSpace = "";
WebServiceOutputPath = "";
WebServiceUrl = "";
}
base.OnPropertyChanged(propertyName);
}
#endif
#endregion
Commenting out the resetting of the properties solves the problem.