I'm attempting to run TextTransform.exe
to generate code using a T4 template file.
The template file is dependent on the T4Toolbox
(specifically, it contains classes implementing the T4Toolbox.Template class).
As such, it includes the file t4toolbox.tt
, which contains the following directives:
<#@ dte processor="T4Toolbox.DteProcessor" #>
<#@ TransformationContext processor="T4Toolbox.TransformationContextProcessor" #>
During execution, I get the following error for both the referenced processors:
C:\Program Files\T4 Toolbox\t4toolbox.tt(1,4) : error : A processor named 'T4Toolbox.DteProcessor' could not be found for the directive named 'dte'. The transfo
rmation will not be run. The following Exception was thrown:
System.IO.FileNotFoundException: Failed to load directive processor T4Toolbox.DteProcessor.
at Microsoft.VisualStudio.TextTemplating.CommandLine.CommandLineHost.ResolveDirectiveProcessor(String processorName)
at Microsoft.VisualStudio.TextTemplating.Engine.ProcessCustomDirectives(ITextTemplatingEngineHost host, TemplateProcessingSession session, List`1 directivesT
oBeProcessed)
I'm running the exe with the following parameters:
TextTransform.exe
-I "C:\Program Files\T4 Toolbox"
-P "[Framework3.5],[VS2008 PublicAssemblies]"
-dp "XsdProcessor!T4Toolbox.XsdProcessor!T4Toolbox.dll"
-r "T4Toolbox.dll" mytemplate.tt
I've tried to include addition directive processors with multiple -dp parameters, and with a comma separated list (I can see both the DteProcessor
and TransformationContextProcessor
are implemented in T4Toolbox
, so presumably the syntax is similar to the specification of the XsdProcessor
?)
Any ideas on how to get rid of these errors? The template generation runs perfectly inside visual studio.