我需要具体说明我的T4,使用C# 4.0,提供我的笔迹? 审判
<#@ template language="C#v4.0" debug="true" #>
但是,当我使用一个动态变量时,就象这样。
dynamic x=10;
Write(x.ToString());
找到这些错误
Error 2 Compiling transformation: Predefined type Microsoft.CSharp.RuntimeBinder.CSharpSetMemberBinder is not defined or imported e:projectsDynamicModelDynamicModelModelGenerator.tt 1 1
Error 3 Compiling transformation: Missing compiler required member Microsoft.CSharp.RuntimeBinder.CSharpInvokeMemberBinder..ctor e:projectsDynamicModelDynamicModelModelGenerator.tt 1 1
Error 4 Compiling transformation: Missing compiler required member System.Runtime.CompilerServices.CallSite.Create e:projectsDynamicModelDynamicModelModelGenerator.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:ProjectsDynamicModelDynamicModelModelGenerator.tt 7 8
Error 6 A namespace cannot directly contain members such as fields or methods e:projectsDynamicModelDynamicModelModelGenerator.cs 1 1 DynamicModel
另外,请注意,使用文本TemplatingFileGenerator和