Getting rid of the unnecessary one output file when generating multiple output files with a Generator

Aug 10, 2010 at 5:04 PM

Hey experts,

suppose I have a T4 template to generate multiple files as described by Oleg here:

Unfortuantely, I always get one file which I need to delete. Say, our T4 file is, then in addition to the actually generated files from my generator I also get MYSTUFF.txt (or whatever extension you choose).

Is there any elegant way to avoid this altogether?


Aug 11, 2010 at 12:26 PM
Aug 11, 2010 at 12:47 PM


Because it is empty... :) it seems like it gets generated 'by default' although I do generate different other files in the generator.

Aug 18, 2010 at 10:50 PM

There is no way I know of to get rid of the "default" output file with the standard T4 host. This file is a result of how the host is integrated in Visual Studio. T4 itself does not create it - Visual Studio does. For now, the best you can do is to generate something useful in it.

Hope this helps,

Aug 24, 2010 at 10:05 AM

Thx Oleg, point taken.