I\'m building a number of projects via a script, and the occasional use of custom build events causes a great deal of difficulty for the build system. If it is possible, I\
In some C# projects I need PostBuildEvent works in Visual studio build, but not works in MSBuild and TFS build. For this purpose I add PostBuildEvent in VS. It sets below code in .csproj:
*... my custom post build event ....*
after that I add below codes to .csproj:
This code sets PostBuildEvent to empty and it occurs only in MSBuild and TFSBuild BeforeBuild target. It is simple, permanent, not need to set params and works fine.