TextTransform.exe似乎只接受一个旧版本的C# [英] TextTransform.exe seems to only accept an older version of C#

查看:187
本文介绍了TextTransform.exe似乎只接受一个旧版本的C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Visual Studio中扩展T4模板时,我可以使用完整的C#3.0语法,包括LINQ表达式等。当我在Visual Studio使用TextTransform.exe扩展它时,它抱怨LINQ表达式和C#3.0的其他新功能。是否有更新版本的TextTransform.exe?

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?

我正在运行的是

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


推荐答案

1.2是Visual Studio 2008附带的TextTransform的版本。但是,它将使用C#编译器版本2.0,除非您指定版本3.5 模板指令。 3.5是C#3.0编译器的C#CodeDOM提供程序的内部版本。

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.

这篇关于TextTransform.exe似乎只接受一个旧版本的C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆