An error of type "ArgumentException" occured while attempting to execute this template. To enable Just-In-Time debugging on this template set the "Debug" attribute to "True" in the "CodeTemplate" directive and add a "Debugger.Break()" statement in the template.
说的很清楚啊,参数异常,说明你的数据有问题,你按这个提示设置debug,跟踪数据看看。
这里提到一个解决方法:
I solved the problem as follows:
In Csla.cst, change
string templateName = objectType.ToString() + ".cst";
to
string templateName = this.CodeTemplateInfo.DirectoryName + objectType.ToString() + ".cst";