I will be concise.
The command FOR /F %i IN (C:\Version.txt) DO @set Version=%i
works perfectly fine in cmd.exe
to read the text of the file into a variable. but whenever I put that line into a prebuild event in Visual Studio it says Exited with code 255
.
On http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx I found that 0xFF / 255 means: The extended attributes are inconsistent.
.
How do I use that command in a pre build event? Many thanks.