How to save the result of a t4 template in a different folder

When I try to give an absolute path for the generated files using

someTemplate.RenderToFile("c:\\tmp\\filename.ext");

      

I am getting the following error

Error 263 Starting conversion: System.Runtime.InteropServices.COMException (0x80004005): There is already a file with the same name in this folder.

although the folder is empty.

0


source to share


2 answers


Vitor,



Are you using Template.RenderToFile method from T4Toolbox ? If so, this method does not currently support saving files to another folder. This has been on my to-do list for a while. Anyway, what are you generating?

+1


source


This functionality was implemented in version 9.3 of the T4 Toolbox: http://t4toolbox.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25294



+3


source







All Articles