c# - How to Get callback after Visual Studio Solution gets Build through VS SDK? -


i using code written below..

envdte.dte dte = (envdte.dte)marshal.getactiveobject("visualstudio.dte.12.0"); dte.executecommand("file.saveall"); // saving files before building  dte.executecommand("build.rebuildsolution"); // buidling solution 

i want execute subsequent code statements after successfull build of solution . there callback defined notifies successful/unsuccessful build ..

first, if using extension (add-in or package), don't use way of getting dte instance, because marshal.getactiveobject(...) returns running instance of dte, , if have 2 instances of vs open, wrong instance. correct way is:

second, see article: howto: performing action before or after build visual studio macro or add-in

the best approach use ivsbuildableprojectcfg.advisebuildstatuscallback method ivsbuildstatuscallback.buildend called , check fsuccess parameter.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -