


But that isn't true when you build the solution from the command line or when you initiate a server build through Visual Studio. When you build the solution in Visual Studio, a text template can access the Visual Studio API (EnvDTE) if the hostspecific="true" attribute is set. There are some differences in what the build tasks can do, depending on which build engine you use. The T4 build tasks run design-time text templates, and they also compile run-time (preprocessed) text templates. There are build tasks that are specialized for text transformation.

Text transformation can be invoked as part of the build process of a Visual Studio solution. Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
