My overall goal is to read all warnings at the end of a solution build, then log them as errors. This is distinct from the TreatWarningsAsErrors setting, because this should also create binaries for projects that had those warnings.
I expect to solve this with a custom MSBuild task, but I don't know what I need to pass it from the .targets file.
EDIT: I don't think this is a duplicate of this question, because that addresses parsing the log for a certain string, and issuing an error for that specific code. I want to get a list of all warnings in the build, regardless of their content.