Reputation: 16145
Is there a way to automatically run the T4 transform when another file is saved?
Upvotes: 5
Views: 2818
Reputation: 292465
The AutoRunCustomTool Visual Studio extension was created to address this exact scenario.
Upvotes: 4
Reputation: 21
It seems like T4 Toolbox is not available for VS2012. However there is now a feature in tangible T4 Editor that allows you to simply add a auto-transformed template to any exisitng file in your solution so that when the parent file is saved the dependend t4 file is transformed. See here:
http://t4-editor.tangible-engineering.com/blog/dependent-t4-templates.html
Upvotes: 2
Reputation: 1916
You can do that with T4 Toolbox. Select the file in Solution Explorer and set the Custom Tool Template
in the Properties window.
I get this answer form How can set the custom tool property of an xml file to a T4 file?
Upvotes: 1