我正在编写一个Visual Studio 2013插件(在C#中),我想注册一个事件,当用户构建他的项目时通知我。我怎么做? 有_dispBuildEvents_OnBuildBeginEventHandler OnBuildBegin,我该如何注册呢?
答案 0 :(得分:0)
events = DTE.Events
buildEvents = events.BuildEvents
buildEvents.OnBuildBegin += MyHandler;
private EnvDTE.Events events;
private EnvDTE.BuildEvents buildEvents;