Let\'s say I wanted to create a static text file which ships with each release. I want the file to be updated with the version number of the release (as specified in A
If you have a library project you can try to use WMIC utility (available in windows). Here is an example. Good thing - you don't need to use any external tools.
SET pathFile=$(TargetPath.Replace("\", "\\"))
FOR /F "delims== tokens=2" %%x IN ('WMIC DATAFILE WHERE "name='%pathFile%'" get Version /format:Textvaluelist') DO (SET dllVersion=%%x)
echo Found $(ProjectName) version %dllVersion%