Is there a way to automatically run the T4 transform when another file is saved?
Asked
Active
Viewed 2,681 times
5
-
1This seems to be the same question as [run automatically t4 templates](http://stackoverflow.com/q/3948248/1380680) – Reinier Torenbeek Aug 03 '12 at 01:39
3 Answers
4
The AutoRunCustomTool Visual Studio extension was created to address this exact scenario.

Thomas Levesque
- 286,951
- 70
- 623
- 758
-
Hello, I would like to ask you as an author of this extension. Do you plan to maintain this extension for future versions of Visual Studio? e.g. VS 2015? I just started to use your extension and it seems to be great. Your last version is from 11/2013 (version 2.0.1). Thank you – user2126375 May 27 '15 at 22:05
-
@user2126375, yes, I'm still maintaining it, I just didn't need to modify it since 2013. I haven't checked if it works in VS2015 yet, but I'll make sure it does. – Thomas Levesque May 28 '15 at 07:35
-
Thanks for info. I tested AutoRunCustomTool in VS 2015 RC and it seems to be working. – user2126375 May 29 '15 at 17:37
2
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

Tim Fischer
- 21
- 2
1
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?

Community
- 1
- 1

Omid Shariati
- 1,904
- 5
- 22
- 44