locked
How do I open the "This project is out of date" dialog window? RRS feed

  • Question

  • Hi,

    I'm working on an add-in to VS2008 and VS2010 in c# for c/c++ projects.

    One part of the add-in will check if the solution is up-to-date, if it is not up-to-date then it will ask the user if he/she wants to build it. This test is done by Visual Studio when selecting "Debug->Start Debugging" and I was thinking of reusing that test and the dialog window.

    Does anyone know if this is possible and if it is can you give me any hints how to do it?

    /Mikael
    Friday, February 5, 2010 2:18 PM

Answers

  • Hi Mikael,

    I think this dialog is used internally by Visual Studio and not exposed, if you just need to show this dialog, why not creating your personal one to simulate it?
    About the up-to-date testing, you could use VCConfiguration.UpToDate Property to check if current configuration's project is up-to-date.  e.g.:

    VCProject vcproj = _applicationObject.Solution.Projects.Item(1).Object as VCProject; // Get the first c++ project in solution

    IVCCollection vcc = vcproj.Configurations as IVCCollection;

    VCConfiguration vcf = vcc.Item(1) as VCConfiguration;

    MessageBox.Show(vcf.UpToDate.ToString());

    Sincerely,


    Wesley Yao [MSFT]
    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact: msdnmg @ microsoft.com
    Please mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Wesley Yao Monday, February 15, 2010 4:17 AM
    Monday, February 8, 2010 6:04 AM

All replies

  • Hi Mikael,

    I think this dialog is used internally by Visual Studio and not exposed, if you just need to show this dialog, why not creating your personal one to simulate it?
    About the up-to-date testing, you could use VCConfiguration.UpToDate Property to check if current configuration's project is up-to-date.  e.g.:

    VCProject vcproj = _applicationObject.Solution.Projects.Item(1).Object as VCProject; // Get the first c++ project in solution

    IVCCollection vcc = vcproj.Configurations as IVCCollection;

    VCConfiguration vcf = vcc.Item(1) as VCConfiguration;

    MessageBox.Show(vcf.UpToDate.ToString());

    Sincerely,


    Wesley Yao [MSFT]
    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact: msdnmg @ microsoft.com
    Please mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Wesley Yao Monday, February 15, 2010 4:17 AM
    Monday, February 8, 2010 6:04 AM
  • Hello,

    How are you? Is your problem resolved? May I know whether the above suggestions helped you?

    Thanks,

    Wesley Yao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact: msdnmg @ microsoft.com


    Please mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, February 11, 2010 2:45 AM