16

I have a web application project made in Visual Studio 2008.

Well, I added a jquery folder and added it to source control and other such things. I forgot to add it to the visual studio project though. How do I add the existing folder now? I've tried just creating a new folder and naming it jquery but it gave me a cryptic error "the directory is already on the disk ... if you want to see this directory then check the Show All Files option in the project file" Yet I looked and saw no such option.

Is the only way around this to rename jquery to jquery2 and then create a new folder via visual studio named jquery and copy all my files into it?

Earlz
  • 62,085
  • 98
  • 303
  • 499

1 Answers1

33

With your project open in Visual Studio, click on your project. Then go to the "Project" menu and select "Show All Files". You should now see any directories or file that are in the directory of the project but not included in the project.

Then, right-click on the folder you want to add, and select "Include in Project" from the context menu.

Jon Schneider
  • 25,758
  • 23
  • 142
  • 170
heavyd
  • 17,303
  • 5
  • 56
  • 74
  • see a screenshot: http://img716.imageshack.us/img716/4104/folders.png I see no such option – Earlz Jun 16 '10 at 22:11
  • 1
    Solution Explorer window, second from the left – Oleg Kalenbet Jun 16 '10 at 22:19
  • 1
    Ok that works fine but I'll still get warnings about files not existing because they are not included in the project. How do I actually add it to the project? – Earlz Jun 17 '10 at 00:15
  • 7
    Right click on the files that are not part of the project and select "Include in Project" – heavyd Jun 17 '10 at 01:09
  • Thanks, +1. This option should be in the right-click context menu of the project in the Solution Explorer. Also, if you rename a directory outside of VS before including it in the project, it will not show in VS until you restart VS, but I use a shared disk. – Roland Jun 03 '15 at 08:42
  • This video explains you how to do this :https://www.youtube.com/watch?v=J7dVoaH-5PU – Diwas Poudel Aug 15 '23 at 00:23