I’m trying to compile an EXE using MSBuild / Delphi 2010, I tried this:
MSBuild.exe /t:Clean;Build /p:config=Release;ExtraDefines=”CodeTest” /property:FileVersion=1.0.0.15 “D:\MyProject\MyFile.dproj”
File is built but version isn’t set
What’s wrong anyway?
Your property “FileVersion” is available inside the MSBuild session, but unless you have a Task or Target that uses it somehow, it’s not being used for anything. You’ll either need to (as DHeffernan says) create a version resource that your code uses or use a post-compile tool to apply the version info to your exe or dll.
This StackOverflow article lists a number of tools to do the post-compile thing.