The Visual Studio project templates generate the "AssemblyInfo.cs" by default, yet this is only a default location. In fact you can place the attribute in any file you would like. The only restriction is that you must place is in the "assembly scope", so the following code will not work:
namespace MySpace
{
[assembly: System.Reflection.AssemblyVersion("1.0.0.0")]
}
The same applies to classes and all other blocks (does work neither).
class MyPlace
{
[assembly: System.Reflection.AssemblyVersion("1.0.0.0")]
}
The assembly information specified in the source-code is embedded in the output assembly during the compilation process, so there is no way to "dynamically" change the values with code (as the code is executed only later, at runtime).
I personally really like to stick with the default version during all local work. The correct version of my assemblies is then set by some kind of build script which is triggered by the build server (Teamcity or Team Foundation Server).
In case you really want to change any properties of an assembly later on you might want to take a look at http://www.mono-project.com/Cecil