I'm developing a Visual Studio Extension and I need to show errors in the VS Error List to the user. I want these errors to prevent/break the building/running of the solution, i.e., something like this. How can I achieve this?
I've tried two approaches but both of them only show errors, they do note break/prevent building of the solution:
- Adapt the ErrorList VSSDK Example project such that errors instead of messages are raised. Errors are shown properly but building is still possible.
- Use the ErrorListProvider as described here. Same issue as 1.
I've also looked a bit at using Diagnostics but you need ReportDiagnostic which seems to be related to code Analyzers specifically.