gpt4 book ai didi

visual-studio - 无法解析指令处理器 T4Toolbox.VolatileAssemblyProcessor 的类型

转载 作者:行者123 更新时间:2023-12-01 03:52:30 26 4
gpt4 key购买 nike

我正在尝试在 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。

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

最佳答案

They are also harder to use than templates because code they generate is invisible to you by default. In addition, the VolatileAssembly is no longer necessary because in Visual Studio 2012 the assembly directive shadow-copies the assembly files before loading them - the developers page -



所以我认为你不再需要这个指令了。仅使用 <#@ assembly name="YourPathOrName" #>将解决您的问题。

关于visual-studio - 无法解析指令处理器 T4Toolbox.VolatileAssemblyProcessor 的类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21100720/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com