T4模板错误

问题描述:

的错误是:T4模板错误

Error 48 A processor named 'PropertyProcessor' could not be found for the directive named 'property'. The transformation will not be run. The following Exception was thrown: 
System.IO.FileNotFoundException: Failed to resolve type for directive processor PropertyProcessor. 
    at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolveDirectiveProcessor(String processorName) 
    at Microsoft.VisualStudio.TextTemplating.Engine.ProcessCustomDirectives(ITextTemplatingEngineHost host, TemplateProcessingSession session, List`1 directivesToBeProcessed) Config.tt 2 4 

的T4模板是:

<#@ template language="C#" #> 
<#@ property name="serverName" processor="PropertyProcessor" type="System.String" #> 

using System; 

如何解决这个问题?这是什么意思?

<#@ property#>是一个自定义指令。它在Visual Studio中不受T4主机的支持。您可以使用GAX主机或提供PropertyProcessor的替代实现,例如Clarius Consulting的T4 Editor中包含的实现。更多here

+0

我在哪里可以找到关于“GAX”的信息?从来没有听说过。 – usr 2009-08-21 14:04:09