I need to let all projects in solution contain some additional build actions, e.g. StyleCop validation, autogenaration of AssemblyInfo's, etc.
My idea is to make some kind of solution-wide prebuild event that will check all project files for containing nodes that match specific xPath. It's not a hard part, it can be solved either with custom build task, or with some third-party Xml handling task. I didn't investigate it deeply yet, but it definitely won't make a problem worth mentioning here.
The questions are how to
1) extend solution file with some custom tasks? It shouldn't be necessary integral part of solution. It is desired, but can be omitted while building from VS, it will be enough to have some specific command line that executes it.
2) if its not possible, there is option described in "Solution-wide pre-build event?". It's hacky, but if there is no other options, I'll use it. But how to get list of project files from solution file? Please, take into account that folder that contains solution may contain extra project files that shouldn't be check, so just enumerate all ***.*proj is not an option.
P.S. Any other options for entire problem are welcome too :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…