I have a fairly large Visual Studio solution (> 30 projects). Every time I start a debugging session, the whole solution is recompiled. I vaguely remember that one of the projects has some xcopy
post-build event, and I know from past experience that this can trigger solution recompilations even when not necessary. So I would like to remove that build event and replace it with a different mechanism.
Unfortunately I cannot remember exactly which project has the build event, and I would like to avoid having to manually open each project's Properties pages and look for a build event.
Is there an automated way for identifying all the projects in a solution that have some build event defined?
You can use the following regular expression in Find In Files to search all the csproj/vbproj files inside your solution directory for
PreBuildEvent
orPostBuildEvent
which isn't followed by a newline character (assuming you didn't put a line break at the start of the build event textbox). Don't forget to tick the "Use Regular Expressions" checkbox:Here is what my Find In Files dialog looks like: