Set constant when compiling in C #

I am using XNA 3.1 to develop a small game, and I want to add the following two functions:

1) Increase the build value every time I compile the file 2) Set the compilation date / time

I want to be able to set the compilation date / time in the window title (e.g. Crysis)
I found this one , but I need more details. I am using Visual Studio 2008.

Thanks,

+4
source share
2 answers

You can install the assembly version, which will be automatically updated upon creation by setting its assembly number and version number in * in the AssembyInfo.cs file:

[assembly: AssemblyVersion("1.0.*")] 

Now the assembly number can be read from the assembly, and you can use this to determine the date when your program was created. See the documentation for AssemblyVersionAttribute for more information.

+3
source

You can use this . He must do whatever you need.

+2
source

All Articles