Visual Studio SDK - Handle File Save Event

后端 未结 1 1153
孤独总比滥情好
孤独总比滥情好 2020-12-30 03:25

I would like to run a script after files with certain extensions are saved in visual studio. I am wondering where the event handler for saving a file is located in the Visua

相关标签:
1条回答
  • 2020-12-30 03:59

    The event handler for saving files is:

    Dte.Events.DocumentEvents.DocumentSaved

    Note you need to keep a reference to Events and DocumentEvents in order for it to actually work. Here is some information on that: http://social.msdn.microsoft.com/Forums/br/vsx/thread/0857a868-e650-42ed-b9cc-2975dc46e994

    Here is a link to 30 sample projects that illustrate all kinds of functionality for Visual Studio Add-Ins:

    http://code.msdn.microsoft.com/Visual-Studio-2010-SDK-ddfe1372

    You can find some getting started informatin here:

    http://msdn.microsoft.com/en-us/vstudio/ff677564.aspx

    0 讨论(0)
提交回复
热议问题