Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wix & T4 : no "Custom Tool" option

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

like image 649
Catalin DICU Avatar asked Sep 01 '10 16:09

Catalin DICU


1 Answers

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.

like image 107
GarethJ Avatar answered Oct 06 '22 01:10

GarethJ