They are declared in the AssemblyInfo.cs file and embedded in the $(TargetPath). You could write a little utility to dig it out again. For example:
using System;
using System.Reflection;
class Program {
static void Main(string[] args) {
if (args.Length == 0) throw new Exception("Assembly path required");
var asm = Assembly.LoadFile(args[0]);
Console.WriteLine(asm.GetName().Version.ToString());
var vers = (AssemblyFileVersionAttribute)asm.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false)[0];
Console.WriteLine(vers.Version);
}
}
Post build event ought to look something like this:
c:\bin\myutil.exe $(TargetPath)