Is there a way to 'Run Custom Tool' for an entire solution?
Why? The custom tool is under development and when changes are made I need to refresh all the items that use it to make sure nothing breaks.
Is there a way to 'Run Custom Tool' for an entire solution?
Why? The custom tool is under development and when changes are made I need to refresh all the items that use it to make sure nothing breaks.
You can execute all T4 templates in a solution in Visual Studio 2010. Right-click on the upper toolbar space and enable the "Build" toolbar. This will add a toolbar with the following:
"Transform All T4 Templates" should give you what you want.
In Visual Studio 2010 there is a button in the icon bar of the solution navigator that will run all of the t4 templates in a solution.
In Visual Studio 2012 show the "Build" toolbar. There is a button in that toolbar that will run all of the t4 templates in a solution.
For anyone who started using the solution provided in the other answers but is finding that running all of the templates in the solution is taking too long - and if a subset of the templates would suffice - then it is possible to run multiple templates using the following steps.
Run Custom Tool
from the context menu.
Since I needed an answer for this and had to make it myself, here is the solution for "Run Custom Tool".
If you just need to run all your T4 templates again, then since VS2012 there is Transform all T4 in the Build menu.
For VS2017 they have removed macros, so follow https://msdn.microsoft.com/en-us/library/cc138589.aspx and make a plugin with your menu item instead. E.g. Name your command RefreshAllResxFiles, and paste this file in (The default command set doesnt include the dlls for VSLangProj, so just find the appropiate package in NuGet):
And the old solution for macro: