![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
卷心恒远
研究达人
展开
-
There was a problem getting an AppDomain to run the transformation from the host. The process cannot
用T4模板开发VS SDK扩展应用,在运行时AppDomain如果没配置正确路径就会抛出这个异常。处理方式: Assembly myAssembly = Assembly.GetAssembly(this.GetType()); string assemblePath = myAssembly.Location.Substring(0, myAss原创 2016-03-30 20:44:00 · 788 阅读 · 0 评论 -
T4模板异常:System.ArgumentException: Empty path name is not legal.
这个异常是T4模板中未引入dll或未找到dll文件。只要修改assembly的name属性值就可以解决。如下:设置路径的原则是dll相对与tt文件所处的文件夹位置,如果是在tt文件的上一个文件夹则可以用..\,在同一个文件夹不需要写路径直接写文件名,在下一个文件夹则写上文件夹名称。也可以写完整路径。原创 2016-03-30 20:58:29 · 2668 阅读 · 0 评论