T4模板错误

3
错误信息如下:
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;   

我该如何修复这个错误?它是什么意思?
1个回答

7

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


我在哪里可以找到关于“GAX”的信息?我从未听说过它。 - usr

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接