VS2022 Extension: How to monitor build output window and modify text

Ben Medina 0 Reputation points

I'd like to write a VS2022 extension that monitors the text in the Build output window pane and replaces the text of certain file paths. It is straightforward to get from the DTE to the Build output window pane through existing documentation, like this:


However, once I have the TextDocument related to the build output, how do I monitor the document for changes? There are no methods on that class related to observing changes.

Thanks for the help in advance!

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
189 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 27,311 Reputation points Microsoft Vendor

    Hi @Ben Medina, 

    Welcome to Microsoft Q&A! 

    Maybe you can try the TextChanged event. 



    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.