Jeff Atwood has a nice post on how to get Team Build to put the build number in the assemblies it builds.

Adding the Build Number to your Team Build binaries

If you're using Team Build, you may want to "tag" the binaries produced with the name of the build.

In order to do this, we'll customize the Team Build script (TFSBuild.proj) for the project, hooking in to the default Team Build BeforeCompile event.