I need to specify my T4 to use C# 4.0, to render my tt files? I tried using
<#@ template language="C#v4.0" debug="true" #>
But when I use a dynamic variable, like this
dynamic x=10;
Write(x.ToString());
I'm getting these errors
Error 2 Compiling transformation: Predefined type 'Microsoft.CSharp.RuntimeBinder.CSharpSetMemberBinder' is not defined or imported e:\projects\DynamicModel\DynamicModel\ModelGenerator.tt 1 1
Error 3 Compiling transformation: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder..ctor' e:\projects\DynamicModel\DynamicModel\ModelGenerator.tt 1 1
Error 4 Compiling transformation: Missing compiler required member 'System.Runtime.CompilerServices.CallSite.Create' e:\projects\DynamicModel\DynamicModel\ModelGenerator.tt 1 1
Error 5 Compiling transformation: One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll? e:\Projects\DynamicModel\DynamicModel\ModelGenerator.tt 7 8
Error 6 A namespace cannot directly contain members such as fields or methods e:\projects\DynamicModel\DynamicModel\ModelGenerator.cs 1 1 DynamicModel
Also, please note that I'm using TextTemplatingFileGenerator and Not pre-processor templates