How can I specify T4 (Text Templates) to use C# 4.0, in VS2010?-Collection of common programming errors
Found that you should specify the correct assemblies as well.
Adding this will ensure you are using c# 4.0.
How ever, for some reason, during the time of t4 transformation, the dynamic dispatching is still not working from T4, wondering why. From T4 it throws a runtime error, the same code does good directly from a cs file.