In Visual Studio (2008) Web Site Projects do not support pre/post build events. Web applications do, but web sites do not.
This doesn’t mean you can’t have pre/post build events however. You just have to be a little creative.
In my scenario, I needed a pre-build event to fire.
1. I added a new class library project to my solution and configured its post build event to execute the pre-build event I wanted.
2. I added a project dependency on the Web Site of the new class library.
Right click the solution explorer on the solution node.
Select Project Dependencies.
Select the web site in the project list dropdown at the top of the dialog.
Check the new class library project on the list of available projects.
Close the dialog.
Now when my web site builds, it builds my new class library, which in turn executes its post-build event. The result is custom logic executing before my web site is built. SUCCESS!