locked
VS2010 Add-in (Include an existing folder in a project) RRS feed

  • Question

  • I cant include existing folder to the project using this function .ProjectItems.AddFolder("existing folder name")

    I tried to delete it then add it , but the "project" still think the folder is there

    any suggestions how to include the existing folder to the project ?

     

    Friday, March 11, 2011 2:38 PM

Answers

  • Get the Solution Explorer toolwindow from the DTE.Windows collection and ensure that it has the focus (Window.Activate) before calling the View.Refresh command.
    MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about developing add-ins: http://msmvps.com/blogs/carlosq/
    • Marked as answer by Code Sniper Thursday, March 24, 2011 5:45 PM
    Wednesday, March 23, 2011 7:15 AM

All replies

  • You need to refresh the solution explorer. See:

    Visual Studio Extensibility: Adding existing folders to a project
    http://stackoverflow.com/questions/64388/visual-studio-extensibility-adding-existing-folders-to-a-project

     


    MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about developing add-ins: http://msmvps.com/blogs/carlosq/
    • Proposed as answer by Carlos J. Quintero Friday, March 11, 2011 4:05 PM
    • Marked as answer by Victor_Chen Friday, March 18, 2011 9:42 AM
    • Unmarked as answer by Code Sniper Thursday, March 24, 2011 5:45 PM
    Friday, March 11, 2011 4:05 PM
  • when I excute "View.Refresh"  I get "Command "View.Refresh" is not available" Error

    I tried to excute it from command line window and I got the same error

    any suggestions ?

    Tuesday, March 22, 2011 9:25 PM
  • Get the Solution Explorer toolwindow from the DTE.Windows collection and ensure that it has the focus (Window.Activate) before calling the View.Refresh command.
    MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about developing add-ins: http://msmvps.com/blogs/carlosq/
    • Marked as answer by Code Sniper Thursday, March 24, 2011 5:45 PM
    Wednesday, March 23, 2011 7:15 AM