TOP Microsoft



tips

location

\Program Files\Common Files\Microsoft Shared\TextTemplating\11.0

files

  • TextTransform.exe
  • TextTemplate.ico
  • Microsoft.VisualStudio.TextTemplating.dll

commnad line

TextTransform [<options>] <templateName>


OptionDescription
-out <filename>The file to which the output of the transform is written.
-r <assembly>An assembly used for compiling and running the text template.
-u <namespace>A namespace that is used for compiling the template.
-I <includedirectory>A directory that contains the text templates included in the specified text template.
-P <referencepath>A directory to search for assemblies specified within the text template or for using the -r option.
For example, to include assemblies used for the Visual Studio API, use
-P "%VSSHELLFOLDER%\Common7\IDE\PublicAssemblies"
-dp <processorName>!<className>!<assemblyName|codeBase>The name, full type name, and assembly of a directive processor that can be used to process custom directives within the text template.
-a [processorName]![directiveName]!<parameterName>!<parameterValue>
Caution
Always type the '!' marks, even if you omit the optional processor and directive names. For example:
-a !!param!value
Specify a parameter value for a directive processor. If you specify just the parameter name and value, the parameter will be available to all directive processors. If you specify a directive processor, the parameter is available only to the specified processor. If you specify a directive name, the parameter is available only when the specified directive is being processed.
To access the parameter values from a directive processor or text template, use ResolveParameterValue. In a text template, include hostspecific in the template directive and invoke the message on this.Host. For example:
Copy

<#@template language="c#" hostspecific="true"#>
[<#= this.Host.ResolveParameterValue("", "", "parameterName") #>]
-hProvides help.

管理人/副管理人のみ編集できます