Update: Read the comments for some good tips from other readers.
Firing up Visual Studio to simply build a solution is nuts. Do it from the Visual Studio Command Prompt instead and save yourself time.
What I always forget, though, is how to specify a release build, ergo I’m writing this blog post so I can quickly find it the next time I need it.
From the command line, use the “/p:” switch and pass the value “Configuration=Release” like so:
msbuild CommunityServer.Sync.sln /p:Configuration=Release
I’m also in the habit of first doing a clean build before the release build to ensure I’ve got no leftover cruft:
msbuild CommunityServer.Sync.sln /target:clean
(Actually, I tie all this stuff together with SlickRun shortcuts and batch files, which is even better!)