VolatileAssemblyProcessor

VolatileAssemblyProcessor

我正在尝试在T4模板中使用我自己项目中的类型,因此我想使用VolatileAssembly指令,这样我就不必一直重新启动Visual Studio:

<#@ VolatileAssembly processor="T4Toolbox.VolatileAssemblyProcessor" name="C:\Josh\Archimetrics\Archimetrics.Consulting\Suntex\SuntexFirstInMathTools\bin\Debug\SuntexFirstInMathTools.exe" #>

但是我一直收到以下错误:
A processor named 'T4Toolbox.VolatileAssemblyProcessor' could not be found for the directive named 'VolatileAssembly'. The transformation will not be run.
The following Exception was thrown:
System.IO.FileNotFoundException: Failed to resolve type for directive processor
T4Toolbox.VolatileAssemblyProcessor.
at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolveDirectiveProcessor(String processorName)
at Microsoft.VisualStudio.TextTemplating.Engine.ProcessCustomDirectives(ITextTemplatingEngineHost host, TemplateProcessingSession session, IEnumerable`1 directivesToBeProcessed)

我已经安装了T4工具箱并重新启动,但是由于某种原因,它无法识别VolatileAssemblyProcessor。

我怎样才能解决这个问题?

最佳答案



因此,我认为您不再需要此指令。仅使用<#@ assembly name="YourPathOrName" #>可以解决您的问题。

10-04 18:39