I want to generate a fragment using T4 but after adding a .tt file to the Wix project there is no "Custom Tool" option for this file. And there is no menu item "Run custom tool" when right clicking on the .tt file.
Is there a hack for this ? I'm using VS 2010 and latest Wix 3.5
The Wix VS project system unfortunately doesn't support single file generators, so you won't get the default T4 experience.
You have a couple of choices. Oleg Sych's T4Toolbox has tools to run templates that target other projects, so you could run them in one project and target the output to your WiX project.
Alternatively, T4 has a simple service API STextTemplating. You could write a small VS add-in that does whatever generation you want in your Wix Project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With