Now compatible with visual Studio 2017 !
RunCustomtoolOnBuild is a visual studio extension that tries to run the custom tools of project files on build.
RunCustomtoolOnBuild is a visual studio extension that tries to run the custom tools associated to project files on build. If you're working on a project that uses custom tool to generate a file (i.e. resx, resw and tt), this tool will run those custom tool automatically if it feels that the generated file is not updated. That it saves you time from running custom tool on each files.
You can download it from visual studio gallery or view the source in GitHub.
**How to use: **
1. Install the RunCustomToolOnBuild.vsix
2. Open Visual Studio 2015
3. Right click on the resource or text template file then click properties.
4. In the properties set the RunCustomToolOnBuild to True.
5. Build the solution. Notice that the resx or TT file regenerates the output files.
The tool will now check TT files for <#@ assembly #> tag and will check if the generated file is updated based on the specified assembly reference's last modified date. This will be useful if you're referencing a DLL in your TT file that is not a part of the project. If it sees that the referenced dll is newer than the generated file. It will run the custom tool on build to generate a newer file.
There's a new property "Always Run". This will mark your file to always run the custom tool on build regardless if the generated file is old/new as long as RunCustomToolOnBuild property is set to true.
Version 1.6: VS 2017 Compatible!
The tool is smart enough to know if the generated file is updated. If it's not updated that's the only time the custom tool will run.
Here are the conditions on when the custom tool should run
When the generated file is not present
When the generated file is empty
When the generated file is older (Last Modified) than its parent
When it's built within in a different solution from the solution it was last built on.
Version 1.4
Run custom tool when it's built within in a different solution from the solution it was last built on.
Version 1.3
Support for resw file.
Show output on Build output instead of showing it in the RunCustomToolOnBuild output window.
Version 1.2
Fixed an issue where a null reference exception occurs when you open a solution and run it immediately without selecting a project.
Version 1.1
If build scope is project, we only check those files that are in the project instead of the files in the whole solution.
Prevents running custom tools on files that doesn't have one.
Added date and time in the output shown in the output window.