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;   

このエラーを修正するにはどうすればよいですか? どういう意味ですか?

4

1 に答える 1

7

<#@ property #> はカスタム ディレクティブです。Visual Studio の T4 ホストではサポートされていません。GAX ホストを使用するか、Clarius Consulting の T4 Editor に含まれているような PropertyProcessor の代替実装を提供できます。詳細はこちら

于 2009-08-21T13:38:11.837 に答える