c# - T4 Template throws error when inserting a control block -
i using following line in text template file
<settingsfilepath> <#=getparametervalue("blah")#>\deploy\settings\deploymentsetting_<#environment.name#>_<#=workflow.name#>.xml </settingsfilepath>
when try modify line insert expression (environment.type.tostring()
) follows
<settingsfilepath> <#=getparametervalue("blah")#>\deploy\settings\<#=environment.type.tostring()#>\deploymentsetting_<#environment.name#>_<#=workflow.name#>.xml </settingsfilepath>
i following error in visual studio compilation of tt templates
an unexpected start or end tag found within block. make sure did not mis-type start or end tag, , not have nested blocks in template.
does know doing wrong? <#= #>
blocks matched.
thanks everyone. worked around using string.format per aaron's suggestion
<settingsfilepath><#=string.format(@"{0}\deploy\settings\{1}\deploymentsetting_{2}_{3}.xml",getparametervalue("blah"),environment.type.tostring(), environment.name, workflow.name)#></settingsfilepath>
Comments
Post a Comment