Why do my T4 templates sometimes append a number to the output file and sometimes not? For instance, in one case I might have a template file called Foo.tt and
Foo.tt
@itowlson's answer really helped me out, but I discovered a slightly simpler workaround that I thought I'd share.
If you have:
Filename.tt └── Filename1.cs
Just rename Filename.tt to Filename2.tt:
Filename.tt
Filename2.tt
Filename2.tt └── Filename2.cs
And back to Filename.tt again:
Filename.tt └── Filename.cs
Voilà.