usr
usr

Reputation: 171178

T4 template error

The error is:

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   

The T4 Template was:

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

using System;   

How can i fix this error? What does it mean?

Upvotes: 3

Views: 1582

Answers (1)

Oleg Sych
Oleg Sych

Reputation: 6558

<#@ property #> is a custom directive. It is not supported by T4 host in Visual Studio. You can either use GAX host or provide an alternative implementation of the PropertyProcessor, such as one included in T4 Editor from Clarius Consulting. More here.

Upvotes: 6

Related Questions