Share via


How to: Run Text Templates

When you have a text template that is ready to use, you can run it as described in the following procedure. For more information about how to run a text template, see Walkthrough: Creating and Running Text Templates.

To run a text template file

  • Do one of the following things:

    • Right-click the text template file in Solution Explorer and then click Run Custom Tool.

    • On the Solution Explorer toolbar, click Transform All Templates.

      If you do not see the Transform All Templates button on the Solution Explorer toolbar, add the following line to the Global section of the solution file.

      GlobalSection(TextTemplating) = postsolution TextTemplating = 1 EndGlobalSection.
      
    • At the command prompt, use the VsTextTransform.exe command to run a text template. For more information, see TextTransform.

See Also

Concepts

Adding Code to Text Templates

Using Built-in Directives in Text Templates

Generating Artifacts By Using Text Templates

Walkthrough: Creating and Running Text Templates