I think I have seen this issue before, just not sure what the resolution is.
My tt file is named Database.tt and after the template executes it creates a Database.cs file
// This file was automatically generated.
// Do not make changes directly to this file - edit the template instead.
//
// The following connection settings were used to generate this file
//
// Configuration file: "MyNamespace.Data\App.config"
// Connection String Name: "EntityModel"
// Connection String: "data source=sss;initial catalog=sss1;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"
using System;
using System.Linq;
using System.Text;
using System.Data.Entity;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using MyNamespace
namespace MyNamespace
{
}
Comments: I have looked into this, and I am still not certain how to prevent it from happening. This happends when you set GenerateSeparateFiles = true. Its not a problem, and the empty file can be ignored.
My tt file is named Database.tt and after the template executes it creates a Database.cs file
// This file was automatically generated.
// Do not make changes directly to this file - edit the template instead.
//
// The following connection settings were used to generate this file
//
// Configuration file: "MyNamespace.Data\App.config"
// Connection String Name: "EntityModel"
// Connection String: "data source=sss;initial catalog=sss1;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"
using System;
using System.Linq;
using System.Text;
using System.Data.Entity;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using MyNamespace
namespace MyNamespace
{
}
Comments: I have looked into this, and I am still not certain how to prevent it from happening. This happends when you set GenerateSeparateFiles = true. Its not a problem, and the empty file can be ignored.