转换期间C#T4模板“错误”

时间:2013-01-25 16:05:53

标签: c# t4

我有一个C#项目,里面有8个T4模板,可以根据我的DBML自动转换我的模型/服务/ repo等。

在实际编译项目时,一切都变好了并且没有收到任何错误,但是在实际运行Transform All Templates命令时我确实收到了以下内容。虽然它似乎并没有真正影响任何东西,但我只是试图找到这个错误的底部。有什么想法吗?

Error   44  Running transformation: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Microsoft.VisualStudio.TextTemplatingA0408758CBA091AEC8619A75CCA2AD32.GeneratedTextTransformation.TransformText() at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result)      1   1   

http://i.imgur.com/gABbpRP.png

enter image description here

1 个答案:

答案 0 :(得分:0)

解决方案中是否有T4文件或本地不存在的任何项目?也许它不是在下载源中。这可能会显示为黄色感叹号,而不是解决方案资源管理器中的错误。

另外,您没有提及是否手动运行每个模板以确保它们都运行良好。

相关问题