Scenario
My project has a post build phase configured to run a batch file that reads the text file "version.txt". The batch file uses the information in the version.txt file to insert the DLL into the version block using this tool .
A .txt version file is included in my project, which simplifies its modification. It looks something like this:
@set #Description="TankFace Utility Library" @set #FileVersion="0.1.2.0" @set #Comments=""
Basically, a batch file renames this file to version.bat, calls it, and then renames it back to version.txt.
Problem
When I modify the .txt version file (for example, to increase the version of the file) and then press F7, the assembly is not considered obsolete, so the step after the assembly does not work, so the version of the DLL does not work.
I really want to include the .txt file as input to the assembly, but am not trying to use anything.
If I # include the .txt file from the CPP file in the project, the compiler does not work because it clearly does not understand what “@set” means.
If I add / * ... * / comments around @set commands, then the batch file has some syntax errors, but ultimately succeeds. But this is a bad decision, I think.
So ... how would you do that?