It would be trivial to write a VS macro that would execute your tool and then run the build so that you can complete the whole process with a single keystroke, the faster you do the double build.
Alternatively (or in combination with the above), you can add a custom tool to the VS Tool menu that your tool executes (see Tools-> External Tools). Then just run this custom tool before you build - it's still a tedious double step, but much faster and easier than building twice. (and you can probably leave your tool at the pre-build stage, so the old double-assembly method will work).
Another option may be to edit the MSBuild script for your project, so that Exec is your tool earlier in the build process, so that changes to the file are selected during dependency scanning (so only one pass is needed to build).
None of them is a great solution, but I hope they can give you an advantage that will provide an acceptable improvement over your current situation.
source share