Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 865
usr Avatar asked Apr 08 '26 10:04

usr


1 Answers

<#@ 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.

like image 107
Oleg Sych Avatar answered Apr 09 '26 22:04

Oleg Sych