Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Studio SDK
 How to: Run Text Templates

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Domain-Specific Language Tools 
How to: Run Text Templates 

A text template file contains a mixture of text blocks and control logic. The control logic is used to combine the text blocks with the data held within a model to produce an output file. There are a variety of uses for text templates; for example, generating code or generating documentation from models. A text template contains both text blocks and control logic that are read along with the model by the text transformation engine. The engine processes the text template to create the appropriate output file that might be source code, xml, html, or another deployable software artifact.

Once you have a completed text template, you can run it as described in the following procedures.

NoteNote

You can also run a text template from the command line using the VsTextTransform.exe command. For more information, see TextTransform.

To run a single text template file

To run all text template files in a solution

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

    NoteNote

    If you created your own template and the Transform All Templates button is not visible on the Solution Explorer toolbar and you want it to display, you must conduct one of the following actions:

    • Invoke the text template by right-clicking on it and selecting Run Custom Tool.

      -or-

    • Add the following into your solution file in the Global section (between the Global and EndGlobal markers):

      GlobalSection(TextTemplating) = postSolution  TextTemplating = 1EndGlobalSection

Security

For more information, see Security of Text Templates.

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker