Let me share with you my build script (VS 2008) perhaps it will be helpful to you. I have this on the windows task scheduler to run every day at noon.
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:"C:\Users\***\Desktop\Project\***" /closeonend:2
chdir c:\Users\**\Desktop\Project\**
rmdir /s /q C:\Users\***\Desktop\Project\***\bin\x86\Debug\app.publish
msbuild
msbuild /target:publish
chdir c:\Users\***\Desktop\Project\***\bin\x86\Debug
"C:\Program Files\WinRaR\Rar.exe" a -r -df -m5 C:\Users\***\Desktop\Project\***\BetaTest.zip app.publish
"C:\Program Files\SSH Communications Security\SSH Secure Shell\scp2.exe" C:\Users\***\Desktop\Project\***\BetaTest.zip ***@***.****:
del /q C:\Users\***\Desktop\Project\***\CCBetaTest.zip
Edit: in further explanation I load the environment variables for vs build, I then perform an svn update. I clean earlier builds. I build twice (because I'm using XNA and it will fail to copy files half the time), I then zip it and scp it to my server (I have RSA keys for my ssh).
I removed my personal information with the ***