I'm working on a Visual Studio extension that will "clean up" compilation error messages to make them easier to read.
I already know how to generate my own errors. Instead, what I am trying to do is modify/replace the text of the error messages that Visual Studio adds to the Error List pane as a result of parsing compilation output.
So far I have been unsuccessful in finding a way to do this. Here are my findings:
- The IVsTaskItems in the SVsErrorList are all read-only, so I cannot edit them directly.
- I cannot delete the IVsTaskItems either, for the same reason (and hence cannot replace them with my own).
- I can append my own text to the Build Output Window pane, but I am not able to modify the existing text in order edit the error messages before Visual Studio parses them.
Is there some other way to accomplish this goal? Is there, within an extension, a way to:
- to hook the call that VS makes internally to add an error message to the Error List, and change it before it is processed?
- to hook the output from the build process and modify it before it is processed by VS?
- to accomplish this via some other means?