Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disconnect code generated by a T4 template from that template?

When I 'run' a T4 template, the class files it generates for me all appear under the template. I cannot remove the template from the project without the files going away too. I also can't copy the files out from 'under' the template into the project root because the are already in the project root. How can I emancipate these files from the template that created them?

like image 902
ProfK Avatar asked Nov 23 '25 14:11

ProfK


1 Answers

Get creative:

  1. Right click and open containing folder.
  2. Drag-and-drop the generated file to another location in the solution.
  3. Delete the original template and file from Visual Studio.
  4. Presto.
like image 103
McGarnagle Avatar answered Nov 25 '25 10:11

McGarnagle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!