We have a tool that generates some code (.cs) files that are used to build the project.
EDIT: These files are the other half of some partial classes, so the build process requires access to the source. It's not possible to compile it into a DLL, for example, and then set the build order.
The tool is run during the pre-build step, but the files are updated in the solution only after the build, which means the build needs to be performed twice to clear the errors after a change to the input.
Example:
- Modify Tool Input File
- Run Build
- Tool Runs and changes source file
- Build Fails
- Run Build
- Tool Runs and changes source file (but it doesn's actually change, because the input remains the same)
- Build Succeeds
Any ideas how we can do away with the double build, and still let our tool be run from VS?
Thanks guys!