When you have another project that is scanned by a template and that project contains modified source code, it would be nice to set the template has dependent of the other project build.
It would be similar to AutoRunCustomTool but for dependent projects of a template execution.
All templates could have a list of dependent projects.
When an active project is built, we can run templates in dependent projects. Then scan all solution for T4 that contains that project name in their dependent projects list and run those templates if they are not in effectively built projects (they have not changed). So they can be executed if they have not changed and are referenced by the project, or are not referenced by the project.
When the solution is built, we can scan all solution for T4 that contains project name of each effectively built projects (they have changed). We can then run those templates if they are not in effectively built projects (they have not changed). So they can be executed if they have not changed.
This will ensure that unchanged built projects templates are always executed.
PS : Everything will be simpler in code, the explanation is for what will happen only.
When you have another project that is scanned by a template and that project contains modified source code, it would be nice to set the template has dependent of the other project build.
It would be similar to AutoRunCustomTool but for dependent projects of a template execution.
All templates could have a list of dependent projects.
This will ensure that unchanged built projects templates are always executed.
PS : Everything will be simpler in code, the explanation is for what will happen only.