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 so
There's a much simpler way of handling this sort of thing. Instead of trying to dynamically change project file contents, you can use a shared build .targets files that are imported into your Visual Studio projects via the mechanism described at http://msdn.microsoft.com/en-us/library/ms171464.aspx (with another example at http://msdn.microsoft.com/en-us/library/ms171464.aspx).