Typically, for that kind of substitution, you use a pre-build step that invokes a script that automatically generates your assemblyInfo.cs file.
You can have a look at this thread : How can you find and replace text in a file using the Windows command-line environment?