Kerala Microsoft user’s group (K-MUG) is organizing a Mini-TechEd in Trivandrum, India. Don’t miss this Free opportunity to learn about Windows 7, Visual Studio 2010 features, WPF, What is new in ASP.NET 4.0, SQL server best practices,SQL logical query execution and optimization tips,Hidden Gems in SQL Server.
The T4 templates are compiled against .Net Framework 2.0 by default and it will be restricted to use LINQ and other .Net 3.5 features in your T4 templates. If you want to use any of C# 3.0 or .Net 3.5 features in your T4 templates, you have to specify T4 templates language attribute is C#v3.5 instead of C#. The .Net 3.5 features are using System.Core namespace so that you have to give reference to System.Core namespace in the T4 templates.
The below is the syntax