当我尝试使用为生成的文件指定绝对路径时
someTemplate.RenderToFile("c:\\tmp\\filename.ext");
我收到以下错误
错误 263 运行转换:System.Runtime.InteropServices.COMException (0x80004005):此文件夹中已存在同名文件。
即使文件夹是空的。
当我尝试使用为生成的文件指定绝对路径时
someTemplate.RenderToFile("c:\\tmp\\filename.ext");
我收到以下错误
错误 263 运行转换:System.Runtime.InteropServices.COMException (0x80004005):此文件夹中已存在同名文件。
即使文件夹是空的。
此功能在 T4 Toolbox 9.3 版中实现:http ://t4toolbox.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25294
维托尔,
您是否使用T4Toolbox中的 Template.RenderToFile 方法?如果是,则此方法目前不支持将文件保存到其他文件夹。这已经在我的待办事项清单上一段时间了。无论如何,你在生成什么?