I have T4 template (mycode.tt) which generates a cs file. I usually right click the tt file and select RunCustomTool which internally takes an xml file and generate code for me. Now i want to run the custom tool using a c# windows application. So onclick of a button i want to run the Custom Tool . Is it possible to run the CustomTool from c#.
Edit:
I have 2 tt files and one of them doesn't have a codebehind cs file. But another has a .cs file attached with it and i am invoking the second file's TransformText() method from the first .tt file. So i need to invoke the first file.So i cannot use the TransformText() method. Is there a way to dynamically call the textTemplate file ?
TextTemplatingFileGenerator
toTextTemplatingFilePreprocessor
. – Izanami