I can't claim to be really familiar with T4 text patterns, but there seems to be a difference between creating the create / build time code (which may include executable statements) and executing the execution code.
So, it <#= #>evaluates the expression inside the template used to create the file.
<%= %> . JIT-, , , , , .
<%# %> , .
. .
< # =... # >
, , "5":
<#= 2 + 3 #>
: http://msdn.microsoft.com/en-us/library/bb126478