When building my SharePoint projects with Visual Studio 2010, I prefer to use Package instead of Deploy. Even if I plan to deploy the wsp on my computer, I want to use my PowerShell scripts in order to test the deployment process for when I eventually deploy to a server that does not have Visual Studio.
If I go to the project properties page, I can add commands to either Build Events > Post-event command line or SharePoint > Pre-deployment Command Line. The former is too early because the solution package hasn't been built. The latter might work, but is there a way to quietly exit or cancel the deployment without receiving a "Build failed" error? If not, is there a way to edit the csproj file so that I can run a post-package command?