Hi,
I ran into a problem with the T4 engine of Visual Studio 2010:
I use "preprocessed" templates to generate code. If I press the "Transform All" button in the Visual Studio IDE, generated CSharp classes are in a namespace corresponding to the directory structure of the project. Example:
File "...\ProjectDir\Templates\MyTemplate.tt" creates a class "MyTemplate" in the namespace "ProjectNamespace.Templates".
This is great, because it allows to have templates with the same name in different directories - and even more important: one can use reflection to find or unambiguously identify templates in code.
The problem:
I'd like to automatically transform all templates on a build. The TransformOnBuild property seems to be the way to go, but all preprocessed templates transformed that way are "placed" in the same namespace "ProjectNamespace" irrespectively in which folder the .tt file is located.
Is there any workaround for this issue? Or is it possible to automate template transformation another way?
Cheers,
Till