A bit late, but a good solution, so I'll share it anyway.
The following solution was taken from this blog post.
You simply define your e.g. post build steps as needed. You don't need to wrap them into a batch file, but you could. Then you alter you project file (such as a vbproj or csproj file) and insert the following fragment just before the project closing-tag:
<Target
Name="PostBuildEvent"
Condition="'$(PostBuildEvent)'!=''"
DependsOnTargets="$(PostBuildEventDependsOn)">
<Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" ContinueOnError="true" />
</Target>
This changes the way visual studio executes the post build steps. The ContinueOnError Attributes instructs VS to simply ignore errors. It still issues warnings in the build results, but it does not stop the build.
You can do the same for the PreBuildEvent by changing the above fragment accordingly.
Of course this works only for all of the build steps in full. You can not selectivly ignore errors on certain steps only. If you need to do that you have to stick to the solution with the batch file, but the nice thing about the solution above is you don't need a separate batch.
Sascha
SET ERRORLEVEL=0
– Treadway