In Entity Framework 4, when using a T4 template (.tt) for entities generation, saving the .edmx file automatically regenerates all .tt files in the same project. This is a fine behavior by default, since the Entities T4 is added next to the EDMX file.
We moved this template to another project to keep entities separate. We manually regenerate it when a change is made to the EDMX file. However, we have a bunch of other T4 files in the same project as the EDMX, which are automatically regenerated as soon as we save the model.
Is there a way to prevent this behavior? Those files could take a while to regenerate. We could of course move the model to another project on its own, but that’s not an option currently.
I don’t know how I could have missed this option for months. When nothing is selected in the EDMX designer, there is a property named “Transform Related Text Templates On Save” that can simply be set to false.