Updates to write out TemplateRefernee in the project file