Default Output Files in Templates

To use a template's default file name for the output file, specify the /out:default command-line switch.

Within a template, you can specify the default output file name by overriding the GetFileName method. For example, if your C# language template contains a property named ClassName, you might include this code to set the default output file name:

<script runat="template">
public override string GetFileName() {
    return ClassName + ".cs";
}
</script>