TextTransform.exe seems to only accept an older version of C#

旧城冷巷雨未停 提交于 2019-12-22 13:53:15

问题


When I expand T4 templates inside Visual Studio, I can use the full C# 3.0 syntax, including LINQ expressions, etc. When I expand it outside Visual Studio using TextTransform.exe it complains about LINQ expressions and other new features of C# 3.0. Is there a newer version of TextTransform.exe?

The one I'm running is in:

C:\Program Files\Common Files\Microsoft Shared\TextTemplating\1.2\TextTransform.exe

回答1:


1.2 is the version of TextTransform that shipped with Visual Studio 2008. However, it will use C# compiler version 2.0 unless you specify version 3.5 in the template directive. 3.5 is the internal version of the C# CodeDOM provider for C# 3.0 compiler.



来源:https://stackoverflow.com/questions/1669893/texttransform-exe-seems-to-only-accept-an-older-version-of-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!