(im using MVC4 VB). I want a FOR .. NEXT loop in my T4 “List.tt” template.
The first line of that template is:
<#@ template language="VB" HostSpecific="True" #>
This gives no syntax errors:
<#
for i = i to 10
writeline(i)
next
#>
but that does not work: “Error 4 Compiling transformation: ‘i’ is not declared. It may be inaccessible due to its protection level.”
So it’s less VB then i expected…
Do you know the correct syntax and/or a website with full T4 documentation?
Description
As the error says. You have to declare the variable
Sample
More Information