At the very end of your csproj file there are two empty MSBuild targets called BeforeBuild and AfterBuild. Those two targets are more or less the replacement of pre- and post-build events. You can add your own script there. I am setting the version in SolutionInfo.cs for instance after getting it from subversion, which is accomplished by using the MSBuild.CommunityTasks:
<Target Name="BeforeBuild">
<FileUpdate
Files="$(SolutionInfoFile)"
Regex="(?<ver>assembly: AssemblyVersion\(").*""
ReplacementText="${ver}$(Major).$(Minor).$(Build).$(Revision)"" />
<FileUpdate
Files="$(SolutionInfoFile)"
Regex="(?<ver>assembly: AssemblyFileVersion\(").*""
ReplacementText="${ver}$(Major).$(Minor).$(Build).$(Revision)"" />
<FileUpdate
Files="$(SolutionInfoFile)"
Regex="(?<ver>assembly: AssemblyInformationalVersion\(").*""
ReplacementText="${ver}$(Major).$(Minor).$(Build)"" />
</Target>
AFAIR the FileUpdate task with the regular expression is also part of CommunityTasks.