visual studio 2010 - How to get IVsBuildableProjectCfg to subscribe to build events? -



visual studio 2010 - How to get IVsBuildableProjectCfg to subscribe to build events? -

i trying instance of ivsbuildableprojectcfg object, have no clue how it.

i can dte project and/or ivshierarchy object representing each active project without problem. how instance of ivsbuildableprojectcfg per project?

ideally, want hook build event of each project know whether or not each build successful, hooking solution see if overall build fired.

(i tried using dte2.buildevents, handler never fire when ran debugger.)

thanks!

here's how can active ivsbuildableprojectcfg given ivshierarchy phone call pphierarchy below:

ivssolutionbuildmanager buildmanager = (ivssolutionbuildmanager)getservice(typeof(svssolutionbuildmanager)); ivsprojectcfg[] ppivsprojectcfg = new ivsprojectcfg[1]; buildmanager.findactiveprojectcfg(intptr.zero, intptr.zero, pphierarchy, ppivsprojectcfg); ivsbuildableprojectcfg ppivsbuildableprojectcfg; ppivsprojectcfg[0].get_buildableprojectcfg(out ppivsbuildableprojectcfg);

then can subscribe build events using:

uint pdwcookie; ppivsbuildableprojectcfg.advisebuildstatuscallback(new mybuildstatuscallback(), out pdwcookie);

where mybuildstatuscallback object create implements ivsbuildstatuscallback.

i hope helps!

visual-studio-2010 events build vsx vspackage

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -