locked
Visual Studio Package: Reload Previously Unloaded Package RRS feed

  • Question

  • Hi there,

    I finally managed to unload a project within my Visual Studio package.

    Now I need to reload this project. Is there any way to do this with the IVsSolution interface? Or must I use the execute command solution?

    I tried the CreateProject method of the solution interface but this hasn't reloaded my project.

    Thx for help
    Fabian


    The Visual Studio Settings-Switcher! Visit http://visualstudiogallery.msdn.microsoft.com/a79072f7-3109-44a0-95c0-9c50e729d6a3

    Monday, September 15, 2014 8:34 PM

Answers

  • Hi Fabian,

    To unload a project call IVsSolution.CloseSolutionElement method:

    solution.CloseSolutionElement((uint)__VSSLNCLOSEOPTIONS.SLNCLOSEOPT_UnloadProject, project, 0)

    To reload a project, call this DTE command:

    DTE.ExecuteCommand("Project.ReloadProject", "");
    You don't actually need to access IVsSolution interface when reload the project.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Caillen Tuesday, September 16, 2014 8:40 AM
    • Marked as answer by Twainsoft Wednesday, September 17, 2014 3:18 PM
    Tuesday, September 16, 2014 8:24 AM

All replies

  • Hi Fabian,

    To unload a project call IVsSolution.CloseSolutionElement method:

    solution.CloseSolutionElement((uint)__VSSLNCLOSEOPTIONS.SLNCLOSEOPT_UnloadProject, project, 0)

    To reload a project, call this DTE command:

    DTE.ExecuteCommand("Project.ReloadProject", "");
    You don't actually need to access IVsSolution interface when reload the project.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Caillen Tuesday, September 16, 2014 8:40 AM
    • Marked as answer by Twainsoft Wednesday, September 17, 2014 3:18 PM
    Tuesday, September 16, 2014 8:24 AM
  • Hi,

    thanks, this worked. Thought I must use the IVsSolution interface.

    Bye,
    Fabian


    The Visual Studio Settings-Switcher! Visit http://visualstudiogallery.msdn.microsoft.com/a79072f7-3109-44a0-95c0-9c50e729d6a3

    Wednesday, September 17, 2014 3:18 PM