locked
SDK Package: When IVsDeployableProjectCfg.StartDeploy is invoked, is it from F5? RRS feed

  • Question

  • Hi!

    I have a rather specific question, relating to the deployment support offered via the IVsDeployableProjectCfg interface.

    In our package, we support the standard operations like Build and Debug, but using the above interface we also support the notion of deploying. To here, everything is very basic: you build, after that you deploy and after this, you are ready to debug.

    Now, if the user hits F5, this sequence (Build, Deploy, Debug) is triggered by Visual Studio, but there is also an explicit option on the Build menu - Deploy. This is also basic and what you expect: hitting it builds the project and deploys it, but does not launch the debug operation (i.e. IVsDebuggableProjectCfg.DebugLaunch).

    But heres a thing I don't get and would very much appriciate some help with: how can I tell, when StartDeploy is invoked, if the reason for it being invoked is b/c the user has hit the Deploy menu option or the user hit F5? Being able to find out which case it is could really boost the performance and functionality of our application.

    Any pointers or ideas are highly welcome!

    /Per

    Thursday, December 23, 2010 11:46 AM

Answers

All replies

  • Hi PsSthlm,

     

    Thanks for your post.

    I suppose you'd like to tell whether deploy or debug trigger the IVsDeployableProjectCfg.StartDeploy.

    If so,

    As far as I know, "Debug" and "Deploy" are two different commands,

    and they can be intercepted by the following way

    http://www.clariusconsulting.net/blogs/pga/archive/2008/08/19/HowdoIinterceptaVisualStudiocommandexecution.aspx

    to set interceptor on those two commands.

    If I misunderstand your issue, be free to let me know.

     

    Best Regards,

    Ziwei Chen


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Victor_Chen Monday, January 3, 2011 9:08 AM
    Monday, December 27, 2010 8:03 AM
  • Hi Ziwei,

    Thanks for the response!

    As for your "I suppose you'd like..."-statement, I can confirm thats the correct assumption; I need to implement the deploy algorithm a little bit differently depending on what triggered it (Deploy or Debug).

    I looked at the link you supplied, and I will experiment some with the proposed approach, and after that I will come back here with the results.

    Again, thanks!

    Best regards,

    Per

     

    Tuesday, December 28, 2010 12:11 PM
  • Hi Per,

     

    Thanks for your feedback.

    I'm going to close this thread, if my reply doesn't help, be free to unmark it any time.

    Have a wonderful vocation.

    Best Regards,

    Ziwei Chen

     

     

     


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 31, 2010 7:57 AM